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
Remove useless regex for redirecting /ghost -> /ghost/
Respect subdirectory in authenticate middleware
Merge pull request #2223 from mjbshaw/fix-subdir

Respect subdirectory in authenticate middleware
Merge pull request #2224 from mjbshaw/useless-regex

Remove useless regex for redirecting /ghost -> /ghost/
Merge pull request #2228 from PaulAdamDavis/master

Fix Firefox <select> height issue
Updated pageUrl helper to page_url

issue #2216
Merge pull request #2222 from knunery/issue#2216

Updated pageUrl helper to page_url
Fix importer adds the same tags to every post

fixes #2234
- updateTags used tags that were overwritten by an async operation
Merge pull request #2236 from sebgie/issue#2234

Fix importer adds the same tags to every post
Update delete post button labels

Closes #2027
Merge pull request #2226 from bdougherty/delete-post-fix

Update delete post button labels
Update delete all content button labels

issue #2027
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
Update package.json for publishing to npm

address #2078

- removes private: true flag from package.json
- created .npmignore file and moved all of buildGlob
 file patterns into here, negating all patterns as
 the npmignore file defines what is to be excluded
 and not included.
- gruntfile now uses the inverse of the .npmignore file
 to define what files to include in a release
Fixes client side bio character counter.

closes #1432
Merge pull request #2241 from bdougherty/issue2027

Update delete all content button labels
Merge pull request #2239 from hswolff/package-json-updates

Update package.json for publishing to npm
Fixing config unit test for Windows
Cleaning up unused blocks