Fix routing of posts and static pages

closes #1757 and #1773

- switches routes.frontend for posts and pages
to use a regex with two capturing groups.  This removes
the need to dynamically remove an express route at a
later point, leaving the decision making to frontend
controller.

- added unit tests for all routing conditions that 
can arise for posts and pages.

- updated functional tests to also test for same thing
in unit tests

- removes old code from server/api/index that used
to fix this issue, but is no longer needed

- removed some un-needed require statements in routes/admin
Update connect-slashes to version 1.2.0
Merge pull request #1793 from hswolff/fix-post-and-page-routing

Fix routing of posts and static pages
Merge pull request #1790 from ErisDS/issue-1776

Ensure that RSS doesn't 404 when there is no user
Update grunt-update-submodules to 0.2.1

issue #1787

- hopefully resolves problems with some versions of npm
Switched Socket permissions to 660.
This adds write permissions for groups and is
more security conscious globally.
Merge pull request #1797 from tomgillett/socket-permissions

Changed socket permissions
Enforce 2-digit dates in permalinks

fixes #1800

- changed permalink regex to require 4/2/2/slug
- changed url helper to enforce the same
- changed permalink toggle to set a specific state, this means the
  functional tests are independent again
- chnaged permalink toggle to wait for the settings page to load
- change as many frontend tests to not login as possible
Merge pull request #1802 from ErisDS/issue-1800

Enforce 2-digit dates in permalinks
Update Casper version on Travis
Functional test debugging & improvements

issue #1702
Date permalinks use published date

fixes #1803

- switches date permalinks from created_at to published_at
- enforces that the post will ONLY render if the date is valid and correct
Merge pull request #1804 from ErisDS/issue-1803

Date permalinks use published date
Route tests

issue #1773

- Adds functional tests for frontend routing
- Tests the request-response contract
- Requires db access at the moment
- Tests #1790
Merge pull request #1805 from ErisDS/route-tests

Route tests
Fix gravatar retrieval

fixes #1778

- use http for initial request, store url with no schema
Merge pull request #1806 from ErisDS/issue-1778

Fix gravatar retrieval
Update CONTRIBUTING.md
Cache control headers & query string asset management

closes #1470
issue #1405

- added cache control middleware
- added defaults for all routes, assets, etc
- updated asset helper to add a query string with a timestamp hash to all assets
- added unit tests for asset and ghostScriptTags helpers
- added cache-control checks to route tests
Merge pull request #1798 from ErisDS/cache-control

Cache control headers & query string asset management