Add support for persistent connections (MySQL & MySQLi).

Signed-off-by: Nicolay Ramm <nico@arguillere.no>