WIP: Functional tests

Fixes #25.

- [x] Setup intern
- [x] Test unauthenticated index
- [x] Test sign in
- [x] Create mock device that responds to commands
- [x] Bootstrapping script (Phony bootstraps itself by inserting records into the db)
- [x] Test ring
- [x] Test lock
- [x] Test erase
- [x] Extract constants
- [x] Add tests/* directory to JSHint/JSCS Grunt paths
- [x] ~~Attempt to make tests DRYer with `before` and `after` functions.~~ (optimization for follow up PR)
I'm on the fence on these: the most common reason to get an error is a duplicate key constraint which can happen if Phony dies unexpectedly and isn't actually harmful on boot. But it could be bad in the future... I'll see if I can make the `unregister` function more bulletproof and then make these more severe.