Switch from cookies to bearer tokens

This PR takes the auth token from the couchdb cookie and exposes it as a bearer
token at the HAPI level:
* When couchdb sets a cookie, it is stripped, and the authToken is added to
    the JSON body.
* When a request comes in, the 'Bearer ...' token is read from the Authorization
    header, and converted to a cookie for couchdb.

This happens at the hapi level.
The solution is based on https://github.com/spumko/hapi/issues/1637
and https://github.com/spumko/hapi/blob/master/docs/Reference.md

TODO:
* [x] <strike>create a couchdb mock in the test framework</strike> (added test/unit/api-plugin-test.js)
* [x] use this to create a test for the `mapProxyPath` function
* [x] use this to create a test for the `addCorsAndBearerToken` method
* [x] add tests for the `extractToken` function
* [ ] fix tests that rely on callback being called
* [ ] fix clashing of integration test suites that both start couchdb on port 6006
This is currently a limitation of the tests, don’t worry about it too much at this point. We’ll fix it with the other tests when we get to it. The important bit is to use a port number that is different from the ones used in the other integration tests.