Add Datastore write capability

This patch addresses the writing capabilities of the Datastore class. The Datastore is now capable of both serialization and deserialization of the records it contains.