datastore: refactor transaction & datastore.

Hello again!

I rearranged a few things, hopefully for the better. I'll leave comments. :)
I dont think we need explicit wildcards to match js files only. It requires maintenance and could be easily forgotten to be maintained as more directories come in.

Isn't the following command the same?
~~~~
jshint lib/ regression/ test/ && mocha test/ --reporter spec
~~~~

We need to separate lint command from test. Lint could fail, but I should be always able to build regardless of lint errors. Current model is also not handy while I'm actively developing and don't want to care about styling. I can't test my experimental code changes.