better handling of latex strings generated in JME

contentsubvars creates a new TString when it subs in a string. That string now remembers the `latex` flag of the thing it was substituting.
The funcObj options object can now have a setting `latex`, which says that the function's output is a string of LaTeX code.
Merge branch 'master' of github.com:numbas/numbas
fix niceNumber with sigfig rounding on whole numbers

fixes #354
Merge branch 'master' of github.com:numbas/Numbas
Merge branch 'master' into variables-test
on loading, gapfill parts are submitted if any of their gaps are answered

fixes #356