Add some unit tests, fix some bugs.

Added xUnit.net/fsunit unit tests for basic parsing/formatting.
This uncovered a couple bugs which were fixed.
Also improved fromObject to support generic IDictionary<_,_> by
using some really silly reflection.