datastore: refactor transaction & datastore.

Hello again!

I rearranged a few things, hopefully for the better. I'll leave comments. :)
We don't need to test where those types are required from or which file they exist in. We optimally don't need any tests in `test/datastore/entity.js` and cover them with the following assertions in test/datastore/index.js.

~~~ js
assert.strictEqual(datastore.Double(val), val);
~~~