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