Fixed #21597 -- Recover from faulty connections.

This implements a way of recovering from faulty MySQL Server connections when an error #2006 is issued from the MySQL Connection Adapter.
It renews the (already broken) MySQL Connection and also resets the faulty cursor by replacing its current instance with a brand new one.