poold: Introduce connection pooler daemon

Add archipelago namespace.

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Introduce archipelago::Logger class

Define public and private class functions. The provided class
supports the following loglevels through the relevant functions:

* logfatal() - FATAL_LOG_LEVEL
* logerror() - ERROR_LOG_LEVEL
* logwarn()  - WARN_LOG_LEVEL
* loginfo()  - INFO_LOG_LEVEL
* logdebug() - DEBUG_LOG_LEVEL
* logtrace() - TRACE_LOG_LEVEL

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Use log4cplus library for the logging backend

archipelago::Logger will inherit from log4cplus base class
as this is going to be used as the logging backend for the
connection pooler daemon.

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Add archipelago::Logger constructor

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Add archipelago::Logger generic logging function

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Add archipelago::Logger public functions

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Introduce archipelago::System class

The provided class exposes the following functionality:

* set_system()
    - daemonize current process
    - set real EUID & EGID
    - set process umask
    - write PID to pidfile
* read PID from pidfile
* write PID to pidfile
* check PID from given pidfile
* remove pidfile

archipelago::System class inherits from archipelago::Logger class
and uses 'System' as logging instance name.

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Add archipelago::System constructor

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Add archipelago::System::set_system function

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Add archipelago::System::read_pid function

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Add archipelago::System::check_pid function

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Add archipelago::System::write_pid function

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Add archipelago::System::remove_pid function

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Introduce archipelago::Socket class

This class provides an abstraction for the named stream-oriented
UNIX domain socket by exposing the following functionality:

* create()
* bind()
* listen()
* accept()
* read()
* write()
* setnonblocking()

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Add archipelago::Socket constructor

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Add archipelago::Socket destructor

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Override archipelago::Socket operators

Override '<', '>' and '==' operators and provide
strict ordering at all times.

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Add archipelago::Socket::create function

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Add archipelago::Socket::bind function

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
poold: Add archipelago::Socket::listen function

The default backlog value is 5.

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>