Making locator an extension to express to be consistent with router

- Locator is now an extension to express to be consistent with `lib/server/router.js`
- Express application has to provide `applicationDirectory` and `buildDirectory` to the locator 
- Moving locator extension to `lib/server`