middleware split + e2e test setup

- split middleware.js into different route files
- set-up protractor and added some simple initial tests
- covered ```app.js``` with unit tests
- fixed remaining jshint issues