[mempool] reset the thread->error before suspending thread

Time out result and other errors is recorded in thread->error. Dirty
error will screw up the error handling code after the thread has been
wake up.
Merge pull request #267 from grissiom/stable-v1.2.x-fix-mempool

[mempool] reset the thread->error before suspending thread