only test the existence of the table being dropped
do not use PTHREAD_MUTEX_INITIALIZER, since MySQL replaces pthread_mutex_t with a different struct (but not the initializer) in debug build
add missing "std::"
Use memset() rather than the deprecated bfill() and bzero()

See http://bugs.mysql.com/bug.php?id=57912
bfill() and bzero() are no longer available in MySQL 5.6
no more dirty hack in the declaration of cac_rwlock::writeref