Fix adjustTemperature method in MD2D engine

[#42838183]

It was causing problems when T == 0.
getSelectedRange was not a function. (local or in codeMirror).

The documented way to get the start and end of a text selection is to use
getCursor(true),getCursor(false) -- which isn't intuitive.. *shrug*
Add _ (underscore.js?) to globals … jshint was complaining …
setupEnergyGraph: addEventListners and RemoveEventListners extracted.
setupEnergyGraph reuse realTimeGraph with .reset (was always create new)

This seems to be the main thing which fixed the reset button behavior.
finishSetupFullPage extracted setupExtras
setupModelCodeEditor prevent global export of md2dmodel (thanks jshint!)
update codemirror to v3.0
code editors: specify json submode of javascript

Autoformat selection now works properly.
support AutoFormat for model editor also
limit movement right of pressure gauge

[#42840513]