Clear queue and reset hydra object on error.

Failed requests were leaved in queue and lead to failures in following
runs. This commit adds rescue blocks to reset queues when an error happens.