Update editor markdown tests

closes #1299

- update tests to check for full strings with spaces now that this is no
  longer an issue
- reorganise duplicated test for images
Redirect uppercase routes to lowercase version

fixes #3857

- adds uncapitalise middleware which detects uppercase in req.path and
  redirects to the lowercase equivalent
- change the ghost route to a regex, just so it's consistent with other
  routes in the file
Delete tokens before deleting a user

fixes #3750

- Updated tests to create tokens for one user. This caused the tests to
  fail for MySQL exposing the bug.
- Delete user's tokens along with posts
Merge pull request #3865 from ErisDS/issue-3750

Delete tokens before deleting a user
Merge pull request #3860 from ErisDS/issue-3857

Redirect uppercase routes to lowercase version
Merge pull request #3859 from ErisDS/issue-1299

Update editor markdown tests