Use BSON for serialization.

Preserves Dates, RegExps and such. Test added.
Closes #7.
WIP