Merge tag 'v2.8.5'

2.8.5

 * fix jshint errors (Clark Wang)

 * test if cb exists (Clark Wang)

 * fix nested remoting function throwing error will crash app (Clark Wang)

 * Fix bcrypt issues for browserify (Raymond Feng)
Rework phased middleware, fix several bugs

Bugs fixed:

 - express helpers like `req.get` are now available in middleware
   handlers registered via `app.middleware`

 - `req.url` does not include the mountpath prefix now, this is
   consistent with the behaviour of `app.use`

The implementation of phased middleware was completely rewritten.
 - We no longer use Phase and PhaseList objects from loopback-phase.
 - Handler functions are registered via the `Layer` mechanism used by
   express router.
 - The app keeps the layers sorted according to phases.
Merge pull request #908 from strongloop/fix/express-helpers-in-phased-middleware

Rework phased middleware, fix several bugs
server-app: make _sortLayersByPhase stable

Fix the phase-sorting algorithm to use a stable sorting algorithm,
since the built-in `Array.prototype.sort` is not stable.
Merge pull request #925 from strongloop/fix/stable-sort-for-middleware

server-app: make _sortLayersByPhase stable
v2.8.6
Merge branch 'release/2.8.6' into production