Catch and retry wait_for_task() methods on ProtocolError exceptions.

Fix for issue #28