example: use the new middleware registration

Rework the example generator to use `server/middleware.json` for registering static file middleware.

A part of strongloop/loopback-workspace#167

/to @raymondfeng please review