Exception handling while refreshing in rpc wallet (credits to QCN)

Handle exceptions properly while refreshing wallet. With this patch wallet never stuck. Simple and useful. There was some dirty fix proposed before and rejected, I hope Mr. Fluffy could reconsider. <3 <3 <3