Move to new API format for Settings.

refs #2606
- Use new API format when updating settings from the client side
- Add additional test to test new API format
- Adjust functional tests to work with the new format
Update users api canThis context

- Update api.users methods to pass the whole context to canThis instead
of just this.user
Sanitize models' attributes/options before passing to bookshelf/knex

closes #2653
- enforce strict whitelists for model methods
- create a class method that reports a model method's valid options
- create a class method that filters a model's valid attributes from data
- create a class method that filters valid options from a model method's options hash
Merge pull request #2700 from halfdan/settings-api

Move to new API format for Settings.
Merge pull request #2679 from appleYaks/sanitize-model-options

Sanitize models' attributes/options before passing to bookshelf/knex
Merge pull request #2702 from jgable/userCanThis

Update users api canThis context
Make DB API functions return JSON-API compatible objects

closes #2647
- GET method returns { db: [exportedData] }
- POST, DELETE methods return { db: [] }
- 'delete all content' test updated
Attach 'Content-Disposition' header on DB export