* Declare duplicate jQuery selectors as variables
* Remove extra semicolons after function declarations
* Remove leftover jquery.js from Java/XML toggle implementation
When the Java/XML toggle implementation was introduced,
jquery-3.2.1.min.js replaced the old jquery script in toggle.adoc
and the old jquery script was accidentally leftover as a result.
While working on another feature, I noticed that the document toggle wasn't updating the ToC. I fixed that. (It matters only in the case where entire headings are toggled, but we do have one such case.)