Added functional test tooling

Proper APi testing behavior includes testing authentication
scenarios, which up until now were not possible because our
functional tests explicitly remove the authorization checks. This
patch re-activates them, and provides tooling to simplify the
management of different users and their authorization tokens.

- Added new ModelBuilder class that maps constructor kwargs to model
attributes (for easier model construction)
- Added load_data method to simplify preloading the database with
test data.
- Added build token method to simplify creating access tokens for
user records.
- Added default headers field for functional tests.
- Fixed functional tests.
- Fixed bug in comments list ui.

Change-Id: I677293a10839a4276acf057dd31ee9f9e22d657b
Merge "Added functional test tooling"