Fixed support for nullables

Nullables were being serialized as objects (i.e. with HasValue and
Value properties), and therefore could not be deserialized.
Support for the TimeSpan type
Merge pull request #18 from roji/nullable

Nullables and TimeSpan