Improve fit function formatting

Show only - sign for powers of ten, e.g. 10^+3 -> 10^3.
Remove + if followed by -.
Consolidate string preparation for MathJax in function.