merge payouts back to pool.py

Fixed problem finding a block at same time as payouts, sqlite dont like it.
Added delays in code.