Middleware phases - initial implementation

Modify the app and router implementation, so that the middleware is
executed in order defined by phases.

Predefined phases: 'init', 'routes', 'files', 'final'

Methods defined via `app.use`, `app.route` and friends are executed
as the first thing in 'routes' phase.

API usage:

    app.middleware('init', compression());
    app.middleware('init:before', serveFavicon());
    app.middleware('files:after', loopback.urlNotFound());
    app.middleware('final:after', errorHandler());

Middleware flavours:

    // regular handler
    function handler(req, res, next) {
      // do stuff
      next();
    }

    // error handler
    function errorHandler(err, req, res, next) {
      // handle error and/or call next
      next(err);
    }

See also:
 - The discussion in #757, especially my [last comment](https://github.com/strongloop/loopback/pull/757#issuecomment-62140861)
 - #739 (the work item)
 - A pure express solution prototyped by Doug: [gist](https://gist.github.com/dougwilson/16d44df4036f19a2c0b1) 

**Out of scope - will be done later**

 - More predefined phases
 - API for adding custom phases
 - Draft of Confluence docs

/to @ritch @raymondfeng please review
/cc @fabien @superkhau 
I don't like the idea of hard coding this... Can we atleast do:

```js
app.DEFUALT_PHASES = ['init', 'routes', 'files', 'final'];
// ...
self._phases.add(app.DEFAULT_PHASES);
```

This allows arbitrary customization of the default phases.