Fix LaTeX representation in NeuronGroup and add tests
Add a bunch of tests (and some small fixes revealed by the tests).