Memory: use API wrap calls for memory re-allocation

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Stats: new console statistics interface.

this new statistics interface reports the whole server memory
consumption per worker threads, this covers server threads (or
workers) plus every worker already spawn by the web service
through the worker->spawn() method.

A stats output looks as follow:

Duda I/O Statistics
===================

+--------------------------------------------+
|          Workers Memory Usage              |
+-----------+-----------------+--------------+
| task ID   | mem bytes       | mem unit     |
+-----------+-----------------+--------------+
| 11019     | 10920           | 10.66K       |
| 11020     | 48              | 48 b         |
| 11021     | 21760           | 21.25K       |
| 11024     | 21760           | 21.25K       |
| 11023     | 34720           | 33.91K       |
| 11022     | 21760           | 21.25K       |
+-----------+-----------------+--------------+

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Query String: new get_id() method (lookup by ID)

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Core: fix memory allocator when overriding internal static file path.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Core: add support for duda_exit() on web services.

From now if the main server receives a SIGTERM signal, it will go through
all web services per virtual host and trigger the duda_exit() callback
in case it exists. This gives the possibility to each service to perform
some last steps before stop working.

The function prototype is:

   void duda_exit();

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Core: new 'service root' feature.

When a request arrives to Duda, it tries to match to which Virtual Host
should be assigned, after that it check which Web Services are registered
under that Virtual Host. So having multiple Web Services under the same
Virtual Host is possible defining different URI addresses for each one
based on their short name, e.g:

   app1 -> http://host1:port/app1/
   app2 -> hhtp://host1:port/app2/

The 'service root' feature allow to define a service it selfs as
'Service Root', which means that it will own the Virtual Host and others
Web Services will not be used (despites they are loaded). So when using
this feature the URI address becomes root and the short name of the
web service is not longer required, so if 'app1' defines it self as
'service root' it will be accessed through:

   http://host1:port/

The way to use this feature can be through the configuration or through
a hard call in duda_main():

1. Web Service Configuration:

   on the Virtual Host configuration, set the 'Root' key with value 'on'
   or 'off', e.g:

   [WEB_SERVICE]
       Enable on
       Root   on

   setting the key to 'on' means the service is root.

2. Setup through duda_main():

   When starting the service invoke the following method:

     conf->service_root();

Both options are valid, just note that using both ways at same time the
option #2 will override any setup made by the setup on #1.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Temporal Workaround for IOV_MAX problem: Ticket #9

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Merge branch 'master' of ssh://git.monkey-project.com/srv/git/duda
Doc: Update README

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
DDR: upgrade Bootstrap from 2.x to 3.0.3

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Console: new 'stats' HTML interface and 'map' fixes

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Session: add support for new /run/shm.

Before this patch the sessions were stored on /dev/shm mount point, but
since now a few distributions started to use the new /run/shm implementation
to cleanup the /dev/ content.

This patch validate both mount points and use the first one that is available,
it start checking /dev/shm and then /dev/run.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Core: update Copyright dates to 2014

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Packages: update Copyright dates to 2014

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Map: fix redirect buffer size

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Merge branch 'master' of ssh://git.monkey-project.com/srv/git/duda
Core: enable service_root support when overriding document root

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Map: new 'map root' method and feature

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
KV: do not warn unused but set parameter

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Event: add TRACE messages

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