datastore: refactor transaction & datastore.

Hello again!

I rearranged a few things, hopefully for the better. I'll leave comments. :)
The test isn't about making sure the file structure is maintained or anything like that. The test is "are you using the functions Double and Int from the Entity module?" Our tests should be scoped as narrow and close to source code as possible. `index.js` doesn't need to know if `Entity#[Double,Int]` works or not, and that's not its concern. The concern of those working is the responsibility of our `Entity` module, where they were defined, and our `Entity` tests.

Not testing everything in one file is for the same benefit as not writing all the library code in one file. Separation is good, and offers a clear path for contributors. When they work on a method in "lib/file-a.js", they can go test it in "test/file-a.js".