Display 404 page if tag does not exist.

closes #2667
- if tag result is '' 404 instead of rendering an empty page
- added test for /tag/asdf should 404
Ensure settings values are strings before saving

closes #2736
-reintroduces JSON.stringify for non-string values in
 api.settings.edit
-added a regression test
Merge pull request #2737 from jaswilli/issue-2736-pg

Ensure settings values are strings before saving
Move mail api to json/api format

Fixes #2650
* rerouted all mail sending to api/mail
* changed request and response formats to json/api-like structure
* tested with forgotten password and new blog email
Merge pull request #2715 from javorszky/iss2650

Move mail api to json/api format
Implements new Themes JSON API

closes #2592
- Add themes browse/read endpoint
- Add new permissions for themes (only admin by default)
- Add integration tests
Fix validation

- fixed validation that broke when introducing error classes
- added a test
Add apps permissable checks in posts and users

Closes #2738

- Re-introduce the TargetModel.permissable interface check in the
regular permission flow path
- Pass loadedPermissions, hasUserPermission and hasAppPermission to
permissable interface to reduce logic necessary
- Refactor recursive call to pass original arguments but with actual
model
- Refactor canThis(this.user) use in api/posts.js to just canThis(this)
Merge pull request #2755 from sebgie/fix-validation

Fix validation
Merge pull request #2673 from halfdan/2592-tags-api

Implements new Themes JSON API
Merge pull request #2735 from shindakun/tag404

Display 404 page if tag does not exist.
Merge pull request #2753 from jgable/fixPermissable

Add apps permissable checks in posts and users
Cleanup API index.js, and add docs

refs #2610
Refactoring API arguments

closes #2610, refs #2697

- destroy expects an object, rather than an id all the way down to the model layer
- all API methods take consistent arguments
- route params such as :id, :slug, and :key are passed as an option & used to perform reads, updates and deletes
- browse, read, destroy take options, edit and add take object and options
- HTTP posts api can find a post by slug
- Add API utils for checkData
Change API to take context as part of options

issue #2610, issue #2697

- get rid of the .call on API methods, instead passing context as part of options