example: use the new middleware registration

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