wait to free mysql* handle until we're freed