966901: Preventing users from deleting Library

Preventing users from deleting Library environment. Also, combined checks into
one method since it's being called elsewhere in the API. Finally, we're
checking that the organization is being deleted in which case we're allowing
the library environment to be deleted.