Unify node and browser api

Improve the `node_api` so that it works the same as the `browser_api`.

To make the library a more node friendly I required jquery explicitly everywhere instead of assuming it as global. So here are some additional tasks done in this pr:

- require jquery everywhere
- remove all global variables in test except `test`
- add a node_api spec
- clean up specs a bit