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
Move config path.update to config.load

issue #1789

- we can do this step a bit earlier and it aids with neatness
- also means for tests that config.load() is enough to get config & paths initialised
Merge pull request #1813 from ErisDS/path-change

Move config path.update to config.load
Error handling simplification & test improvements

fixes #1266

- simplifies the check for if a theme has an error template
- adds more / better tests for error handling
disable save button during image uploads

closes #1661

- disables save button at beginning of image upload
- enable save button at image upload fail, at image upload and download success and also at dropzone init
Fixes admin session cookie test

- Currently the test is taking the response date
which is in UTC and passes it through moment()
which by default parses input as local time.  We
then add 12 hours to this now local time
and when compared against the response set-cookie
header the time spread is wrong.

- To fix we’re parsing the response date with
moment.utc which parses the date in UTC.
Merge pull request #1816 from hswolff/fix-admin-session-test

Fixes admin session cookie test
Merge pull request #1815 from ErisDS/more-tests

Error handling simplification & test improvements