966901: Preventing users from deleting Library

Preventing users from deleting Library environment. Also, I refactored the
before_destroy validation in environment into one method as the previous
confirm_last_env method didn't check organization.being_deleted?.