Added basic api structure
Need to pass GitServer object to api middleware
Adapted to http api - if no http api is enabled, all request will be handled normally
Better to pass whore req object to router
Modified example to reflect new api
Merge branch 'master' into feature/http-api
pathname must be slitted instead of an object
Added some methods to api