[#1728] fix heavy query c3p0 connection testing

Use MySQL ping if apropriate, a SELECT 1 otherwise