datastore: refactor transaction & datastore.

Hello again!

I rearranged a few things, hopefully for the better. I'll leave comments. :)
This module is pretty cool but I don't think we need it here in this case, because we don't need mocking. We need to test if it constructs a Double with the given boxed value.

~~~ js
var doubleValue = datastore.Double(val);
assert.strictEqual(doubleValue.val, val);
~~~