Http Server: fix a bug in the matcher

While testing the code a bug was found in the matcher. The matcher
should use find and not find_first

find_first return the first character from the given string and not the
location of the given string.

In practice in the code the url parameter that would be passed to its
search string will start with a slash, and becasue that so do the url,
this call will always return 0 and this part of the if, will succeed.
Consider this case: url = "/ui/os" param="/uiabc" those two are
different, and find will return npos, but find_first will return 0 and
the entire if will evaluate to true.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Http Server: Search a header in the request by its name

The request object holds the headers in a vector. This is because a
header can apear more than once. Sometimes it is nessary to find a
header, where only one header will be found.

The get_header method searches for the first header by its name

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Http Server: Add a file transformer

When the http server reads a file from the disk, it is sometimes
required that the file content will be transform and string substitution
will be perform.

For example, when reading the json files, it is required to place the
real host name/ip so the Swagger-UI will be able to use those files. The
file transformer will look for a variable in the file (given that it has
the right extension) and will replace it.

Currently it only support {{Host}} variable, additional variable can be
added when needed

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Http Server: Add file mapping

There are few scenarios where the httpserver should return files from
the disk in reply to a request.

The json api that are located under /usg/mgmt/api are mapped to
/api/{path}

so a call to
http://192.168.122.89:8000/api/api-docs.json
should return the api doc

The Swagge libray, that is located under /usr/mgmt/swagger-ui is mapped
to /ui so a call to
http://192.168.122.89:8000/ui/index.html
should open the Swagger GUI

The swagger index.html is mapped to /ui so a call to
http://192.168.122.89:8000/ui would also open the Swagger gui

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Http Server: Add file mapping to main

main should call the init method to initilize file mapping

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Json Swagger API: use variable for host name

The Swagger definition file holds the url of the serving host. This
cannot be hard coded, as it will vary depends on the installation.
Instead of a full host name a variable is used in the server will
replace it according to the incoming request.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
API: Adding Swagger-UI submodule

Swagger-UI is a frontend GUI for the rest API. Swagger-UI was branched
under the OSV repository and Swagger-UI is now a submodule of the mgmt
submodule

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>