The client was not handling RuntimeExceptions correctly which resulted in an
infinite loop. This was a result of not correctly handling an ExecutionException.
The use of an atomic integer to count number of active tasks has been introduced
instead of the unnecessary collection of futures. The shutdown has been
simplified by these steps. I've also introduced processing of completed commands
via an iterator interface.

Fixes issue #9
Fixes issue #10 (I think).