Add validation from schema.js

closes #1401
- added data/validation/index.js
- added generic validation for length
- added generic validation for nullable
- added validations object to schema.js for custom validation
- removed pyramid of doom from api/db.js
Custom Page Templates

fixes #1969

- creates new ./server/helpers/tempalte.js method
 which returns the correct view to use when rendering

- updates fronted controller to check if a custom page template
 exists and if so then uses that to render the static page

- adds additional class name to body_class helper when
 a custom page template is being rendered

- adds tests to address all new features
Fix problems from importing 0.4.0 file

fixes #2244
- added mysql ‚true’/‚false‘ values as ‚0‘/‚1‘
- removed all core settings from import
Remove res.redirect from db.exportContent

closes #1654
- added frontend route /ghost/export/
- removed request handling from API
Merge pull request #2243 from hswolff/custom-page-templates

Custom Page Templates
Refactor require-tree to not share messages

- Pass in messages to each method so they are not shared
- Export each method for calling individually
- Update reference to default export of require-tree
- Add default values for messages if not passed in
Merge pull request #2266 from sebgie/issue#2244

Fix problems from importing 0.4.0 file
Merge pull request #2284 from sebgie/issue#1654

Remove res.redirect from db.exportContent
Add JSON API tests & cleanup

first 10 % of #2124
- added initial version of JSON API tests
- renamed error.errorCode to error.code
- renamed tags.all to tags.browse for consistency
Merge pull request #2280 from sebgie/api-cleanup
Merge pull request #2220 from sebgie/issue#1401

Add validation from schema.js
Update link to clean up history in contributing.md

Fixes #2296
Also replaces line endings, not sure why (tried with all the settings,
git would just not have it)
Add plugin icons to Apps menu item in Ghost settings

closes #2290
- added css entry in settings.scss for to display plugin icon for apps menu item
- remove unused css entry for .plugins in settings.scss
Merge pull request #2295 from seanhellwig/issue2290

Add plugin icons to Apps menu item in Ghost settings
Merge pull request #2297 from javorszky/iss2296

Update link to clean up history in contributing.md
Fixing typo in allowedSections for allowed pages under settings
Merge pull request #2311 from stenehall/master

Fixing typo in allowedSections for allowed pages under settings
Prevent settings page from rendering same page twice

Closes #2316
- There was a check to prevent rerendering of same content pane but it wasn't working
- Fixed the check for this
Shifts app UI behind config option

Closes #2287
- adds helper for checking whether to show apps UI or not
- hides app UI from settings page
Detect tag.hbs template in themes

closes #2320
- changed detection from "tag" to "tag.hbs" in "frontend.js" contrroller