fix losing database connection
as gearmanworker works in daemon mode it's losing connection to database after some time of inactivity or when database was restarted. now it tries to reconnect 2 times
Merge pull request #21 from Edugate/develop

gearmanworker for stats: fix losing database connection