Catch boost::lock_error in destructor as destructors may not throw

This is intended to prevent the possibility of ~unique_lock throwing a lock_error, which would terminate any program in which it occurred.