test: extract createSharedClass to helper file

Move the function `createSharedClass()`
  from test/rest.test.js
  to test/helpers/shared-objects-factory.js
so that it can be reused by multiple tests.
ext/swagger supports non-root location of REST API

When the swagger extension is configured with a custom basePath,
this basePath is honored in the Swagger descriptors now.

1. When `options.basePath` is not defined, `http://{host}/`
  is filled based on the `Host:` header in the HTTP request.

2. When `options.basePath` starts with `/`, it is appended to the
  host URL, i.e. `http://{host}/{options.basePath}`.

3. When `option.basePath` is a http or https URL, then this value
  is passed to the descriptor without any modifications.
Merge tag 'v1.1.3'

1.1.3
Merge pull request #25 from strongloop/feature/swagger-support-for-custom-api-path

Swagger supports non-root location of REST API
Modify RestAdapter to own the whole URL space

Add urlNotFound middleware converting all unhandled requests into
a 404 error. This way to the express app created by
RestAdapter.createHandler always returns consistent error responses
and also prevents other parts of the application from creating
a URL clash.
Merge pull request #24 from strongloop/feature/handle-404-in-rest-url-space

Modify RestAdapter to own the whole URL space
Add a test case for the 'skip superclass' fix
Merge pull request #27 from strongloop/feature/add-testcase

Add a test case for the 'skip superclass' fix
Bump version
Merge branch 'release/1.1.4' into production