Merge pull request #2 from lynxis/master

update gevent to 1.0 + fix a crash on shutdown
Merge pull request #3 from lynxis/master

broker: gevent.subprocess needs to be an explicit import
Code style.
include missing headers
add missing forward declaration
silence warning 'unused parameter'
fix wrong return type
Merge pull request #4 from mehlis/fix-warnings

Fix warnings
Fixed whitespace and updated year.
Renamed log ident to td-client.
Added support for broker hostname resolution.
Avoid use of getaddrinfo_a as it is not available in uClibc.
make use of context_free function

In error case the context is freed without freeing its members.
Use the existing context_free function, which was unused until now
to free the context and its members.
Merge pull request #6 from mehlis/context_free

make use of context_free function
Refactored context_free.

"Not NULL" checks are not needed as context memory is zero
initialized and free already checks whether the underlying
pointer is set to NULL.
fix calculation of ready_cnt

in case multiple messages from the same broker are processed,
ready_cnt is increased multiple times.
Merge pull request #7 from mehlis/fix-ready-cnt

fix calculation of ready_cnt
fix: warning: void function 'context_process' should not return void expression
Merge pull request #9 from mehlis/fix-return-void

fix: warning: void function 'context_process' should not return void exp...
generic broker selector

add the possibility to change the broker selector alorithm via command
line

implement "use first broker" and "use random broker"