Http Server: clean the routes class and simplify its API

Some clean up was done to address issues in previous reviews. mainly remove camel case names and an error
message was chagned to be more meaningfull.

Adding a route with a rule, can be a bit complicated even if the rule
itself is pretty simple, for that a rule method was added that generate
and return a rule.

Consider the rule that should match /file/{path} and assume that handler
is a pointer to a handler that should handle the calls to that url.

If route is the object, you could add the rule like:
route.rule(handler,"/file").add_param("path");

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Http Server: matchrules clean up

Cleaning the matchrule object, changing camel case names to snake case

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Http server: handlers complete support for file_parser

The file_praser is an option to parse a file while reading it and modify
part of its content. For example, the Swagger json api, needs to return
an abosolute valid url path. To do that a variable is placed inside the
json file '{$Host}' and when a file is read, a parser would replace the
{$Host} with the host identifier taken from the request (ie.
192.168.122.89:8000)

To simplify using the parser, it was added as an optional parameter to
the file_interaction_handler constructor and a destructor was added to
remove it.

While going over the code, some unnecessary code was removed

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
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

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

When the http server reads a file from the disk, it is sometimes
required that the files will be parse 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 will be able to use those files. The
file parser will look for a parameter in the file (given that it has the
right extension) and will replace it.

Currently it only support {$Host} parameter, additional parameters 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://localhost: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://localhost:8000/ui/index.html
should open the Swagger GUI

The swagger index.html is mapped to /ui so a call to
http://localhost: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>