Hack core to allow drupal to function during a global database read lock

This appears to ignore any queries that would block during the global read lock of FLUSH TABLES WITH READ LOCK, thus allowing Drupal to operate in a read only mode.