Merge pull request #22 from JonathanO/master

Fix the XML mapper a bit. It'll now at least parse moo templates in more cases. Also adds some more tests.
Merge pull request #24 from JonathanO/master

Fix for issue #23 : Annotations aren't picked up if the class isn't in a namespace.
Cope with case where class keyword is on the line before the class name.
Giant refactor for own internal json encoding
It now understands the difference between arrays that should be encoded as json arrays, and arrays that should be encoded as objects.
This deprecates the Type interface, replacing it with a JsonType interface.
It also renders writeArray() somewhat less useful. Unless you have a very good reason, you should stop using it.