Implemented MySQL reconnect
Merge branch 'master' into peercoin