htmlutils: fix single quote escaping

* Fixes function escape_html() to translate single quotes into
  correct HTML entity; `&#39;` -> `'` instead of `&#34;` -> `"`.
Merge branch 'maint-1.1'

* maint-1.1:
  htmlutils: fix single quote escaping
htmlutils: improve js string escaping

* Moves/renames jsonutils.wash_for_js() function to
  htmlutils.escape_javascript_string() as this function would mostly
  be used to escape javascript in HTML context.
  Updates bfe_bookmark accordingly.

* No longer adds double-quotes around the returned string in
  order to be more flexible regarding the context in which the
  string is inserted.

* More complete escaping of Javascript chars when 'json' is not
  installed.

* Adds parameters to control the level of escaping, to be adjusted
  according to the context (HTML vs JS output, XHTML vs HTML,
  content-type, use of CDATA delimiters).

* Adds docstrings and unit tests.

* Merge note: fixed indentation in `htmlutils.py`.

Tested-by: Tibor Simko <tibor.simko@cern.ch>
mathpreview: js-based math preview panel

* JQuery plugin to display math rendering (via MathJax) preview
  next to input fields or textareas.

* Plugged for submissions, and enabled via CFG_WEBSUBMIT_USE_MATHJAX.
  (closes #1221)

* Enriches Submission Guide in consequence.

* Updates MathJax configuration to enable '$' escaping, with
  tex2jax->processEscapes=true, as recommended in MathJax doc
  when using '$' as inline delimiters

Tested-by: Tibor Simko <tibor.simko@cern.ch>