Make local vars static

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

Added argument passing between the threads, enabling them to signal each
other (in a given order) that no more work should be done and they
should return.

Each thread can stop the requestReader, who in turn messages
requestHandler. requestHandler flushes all worker threads (to give them
chance to write to responseWriter's queue) and messages the
responseWriter to terminate.

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

Signed-off-by: Dima Kuznetsov <dkuznets@redhat.com>
Fix warning message and indentation

Signed-off-by: Dima Kuznetsov <dkuznets@redhat.com>
Make call to stop_request_reader conditional

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

Signed-off-by: Dima Kuznetsov <dkuznets@redhat.com>
Merge pull request #4 from dimakuz/add_term

Add term