Fix up mechanics printer.
Add test for MechanicsLatexPrinter.
Use _print on exponent.
Remove trailing newline.
Merge pull request #2392 from stefanv/fix_mechanics_printer

Fix up mechanics printer.