Fix some static and const correctness

Signed-off-by: Dima Kuznetsov <dkuznets@redhat.com>
Changed thread creation to thread pool.

Request handler now delegates the processing to a thread pool of
workers. If no param is specified, 0 is assumend and the thread pool in
not limited, however it may reuse threads. Otherwise, if specified,
threads are NOT created immediately, however retained and reused.

Signed-off-by: Dima Kuznetsov <dkuznets@redhat.com>
Add support for older versions of GLib2

Signed-off-by: Dima Kuznetsov <dkuznets@redhat.com>