Make DB Import backwards compatible

closes #2716
- Continues to parse and allow import with the old format
- Detects the presence of the new JSON-API format and allows import
Add distinct error classes

closes #2690
- added new error classes
- moved errorhandling.js to /errors/index.js
- changed API errors to use new classes
- updated tests
Merge pull request #2704 from sebgie/issue#2690

Add distinct error classes
Merge pull request #2719 from appleYaks/import-backward-compatible

Make DB Import backwards compatible
Add try-catch to startup

- Should prevent Ghost from exiting without an error message
Adjust test to handle timing issue on upload modal

ref #1702
-change the tests for the cover and logo image upload modal to
 handle a timing issue in the way they are rendered
Merge pull request #2729 from jaswilli/test-errors

Adjust test to handle timing issue on upload modal
Another adjustment to handle timing issue on tests

ref #1702
-timing issue with the test still exists in #2729 since
 .description is added to the dom after the fact via js
Merge pull request #2730 from jaswilli/test-errors

Another adjustment to handle timing issue on tests
Fix intermittent image upload modal failures

ref #1702
-wait for logo upload modal to go away before beginning test
 for cover upload modal
Merge pull request #2733 from jaswilli/test-error

Fix intermittent image upload modal failures
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
updateTags refactor

closes #2720
-refactor Models.Posts.updateTags method to reduce complexity
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 #2726 from jaswilli/issue-2720-tags

updateTags refactor
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