Moving nanoscroller to be managed by bower
Merge pull request #4237 from ErisDS/nanoscroller

Moving nanoscroller to be managed by bower
Clean up hardcoded ghost paths

closes #4144
- made contributors template use the `gh-path` helper
- Removing blogRoot from application.js
- made error image use the `gh-path` helper
Merge pull request #4163 from mattiascibien/issue-4144

Clean up hardcoded ghost paths
Allow Ghost to be used as middleware within another Express app.

closes #827 #3849
- Ghost can now be mounted as middleware in another Express app by
  `app.use('/blog', require('ghost/core/server/middleware')(ghostConfigHash));`
- Update messaging to account for server versus middleware.
- Allow access to Ghost's initialization-complete promise through the
  `.ghostPromise` property added to the middleware instance returned.
  (Neither the framing app used for functional tests nor an example
  Express app showing Ghost used as middleware needs this, but examples
  of its use can be found in `test/unit/middleware_spec.js`.)
- When used as middleware, `ghostConfigHash` should not contain `url` or a
  `server` block.
- Base URL and path for Ghost determined dynamically from the .mountpath and
  request information provided by Express.
- Ghost configuration can contain `generate404s` and `generate500s` keys.  When
  their values are `false`, Ghost will no longer serve the associated pages.
- Created new grunt task `test-middleware-functional` that runs the
  `test-functional` tests against a test server including Ghost as middleware
  (plus a number of other tasks/assets needed to support).  Did _not_ add this
  to the set of tasks run by `grunt validate` for fear of impact on build times.

Design issues:
- Because we return an Express middleware instance immediately, but finish our
  initialization asynchronously, it's possible that on startup the parent
  application could ask us to handle requests before we're ready, with
  indeterminate results.  A parent app author could protect against this by
  watching our initialization promise.  Or we could ensure we're ready before
  requests are processed by inserting another layer of Express middleware that
  passed requests on for processing in `.then` calls on the Ghost initialization
  promise.  I decided that the added complexity of this protection wasn't justified
  by the startup-time risk, but it could be added.
- I'm not necessarily happy with making Ghost's initialization promise available
  as a property of the Express middleware instance we return, but it seemed like
  the least of evils, and I'm not aware of any other Express component that has
  this need reference for guidance.  Any alternative suggestion would be welcome.

Refactors:
- The existing `middleware_spec.js`, which tested Ghost's internal middleware
  components and configuration was moved to `server_middleware_spec.js` to allow
  the unit tests for `server/middleware.js` to use that name.
- Validation of the content of Ghost's configuration was moved out of the
  file-loading method and is now invoked by `config.init` so that checks apply
  to both files and passed-in configuration hashes.
- The entry `asMiddleware:true` is automatically added to the config when
  Ghost is initialized through the middleware entry point, so that internal code
  that only operates in this case can test for an explicit configuration.
- `checkNodeVersion()` was moved out of `ghost-server.js` and into
  `utils/startup-check.js` so that it could be shared between server and
  middleware configurations of Ghost.

References:
- The individual commits squashed into this PR are available on the branch
  git://github.com/gleneivey/Ghost.git#separate_middleware_entry_point
- A trivial example Express application that incorporates Ghost as a
  middleware component is in https://github.com/gleneivey/example-express-with-ghost-middleware
- A wiki page that may be copied into the main Ghost wiki, describing
  how to configure/use Ghost as middleware is available at
  https://github.com/gleneivey/Ghost/wiki/Using-Ghost-as-Express-Middleware