PCT-637: Query Analytics does not handle MySQL Restart

Tests pass: http://tools-ci.percona.com/job/percona-agent-branch/50/console