Added check to cehck if the mysql connection is still usable

persistent connections are sometimes stale,
pinging the connection and if that doesn't work reconnect helps

git-svn-id: https://svn.muze.nl/svn/ariadne-php5/trunk@6409 7882d7ee-46e0-0310-a255-a28a61b628e4