Makes the Ghost application more express middleware friendly.

refs #827

- Moves ./index to use Ghost in a similar manner to how someone uses
Ghost as an npm module.
- Allows Ghost to be cleanly mounted on another express application
on any arbitrary endpoint, all you need to customize is the mount path.
Removes config.theme and restructures how theme variables are cached

resolves #1789

- removes config/theme.js
- moves caching of theme variables to api/settings.js which is where the
rest of the settings cache occurs.  this removes the requirement of having
to push changes to cache, now it simply occurs alongside when settings
are changed.
- updates relevant tests.
Prevent editor title from being overwritten

Closes #3955
- Change titleScratch from being bound to the title to being
  set when entering the editor so it is not overwritten on a
  model refresh.
- Ensure that the "unsaved content" dialog is shown when there are
  changes to the "scratch" fields after a post-settings-menu change.
- Add tests to prevent regression.
Stop packagePath variable from being undefined
Ability to create custom template files for custom tags. Eg. `tag-design.hbs`
Merge pull request #3963 from jaswilli/issue-3955

Prevent editor title from being overwritten
Merge pull request #3968 from thaiphan/master

Stop packagePath variable from being undefined
Merge pull request #3902 from Chrisui/custom-tag-templates

Custom template files for custom tags
Merge pull request #3867 from hswolff/middleware-work

Makes the Ghost application more express middleware friendly.
Replaces sendmail with direct

Closes #1538
* rips out sendmail
* adds direct
* updates nodemailer to 0.7.1
* changes unit tests for mail
* changed integration tests for mail
* adds mail api tests
Force apps flag to be boolean in config API

ref #3969

- it shouldn't be possible to set keys via this flag
Merge pull request #3988 from ErisDS/app-flag

Force apps flag to be boolean in config API
Fix user profile settings

References #3810, #3944

- Fixes several small visual bugs with the user settings page
- Changes `.settings-subview-header` to use a clearfix instead of `overflow: hidden;` (fixing style issues in #3944)
Handle EADDRINUSE

no ref
- Show a human readable message on EADDRINUSE
Merge pull request #3990 from halfdan/handle-addrinuse

Handle EADDRINUSE
Remove active class from buttons.

refs #3989
- Remove active class from {{#link-to tagName="button" ..}}
Merge pull request #3991 from halfdan/3989-active-class

Remove active class from buttons
Add authentication scope.

closes #3982
- Set custom key to use in localStorage based on subdir
Improve keyboard support

issue #3964
- added :focus selector to improve keyboard support in modern browsers
- added :active selector to improve keyboard support in old IE
Merge pull request #3995 from JamieKnight/keyboard-support

Improve keyboard support