data: new 'data' object

The new 'data' object introduce the concept of data directory
per web service. This means that each web service can define a
specific directory to be used as an application repository to
upload files or to have something specific related to the web
service that must not be public through HTTP.

The methods implemented are:

   const char *get_path();
   int set_path(const char *dir);
   char *locate(const char *filename);

For more details of API usage of this object refer to:

   http://duda.io/api/data.html

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Worker: fix documentation

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Core: multiple changes

Note: patch that add multiple things, worked in a non-git repo.

- The stack now is able to serve static content from built-in features
through a fixed directory path set through a new configuration key
in duda.conf named. DocumentRoot. This content is web-service
agnostic and the content is mapped through the address http://host/ddr/,
where 'ddr' refers to 'Duda Document Root'.

This feature is fundamental to render internal content pages with
specific data.

- Console/Map: the console map have been improved and now the routes are
separated by static map or interface/methods. All content is rendered
using the Bootstrap framework.

- Configuration template adds #LIBDIR# macro and adds new path for
the htdocs directory

- New internal call duda_override_docroot() to override a document root
for a given incoming request, the doc root is set initially by the vhost
and then overrided by Duda core, taking care of populate session_request
struct properly.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Query String: fix comparisson when retrieving some variable

Under similar variables in the query string, the API was returning
the value of the shorter variable name without compare the lenght
string. E.g: if exists two keys 'd' and 'data', it always return
the value of 'd' when quering for 'd' and 'data'.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Core: move API macros inside the structs

Before this patch, each API function that required to be expanded
through a macro by the pre-processor, was being declared as global,
this generated some issues when two API objects had similar function
names, in some cases the macro were overriden.

This patch put each API macro inside the struct, so we keep the references
protected to avoid any override.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>