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.

/to: @ritch or @Schoonology please review
/cc: @raymondfeng