Prevent deletion of Commerce Types with existing content

This is a redo of the other pull requests.

- Small cleanups
- Dont allow removing entity types while they are still referenced
Merge pull request #36 from Jbekker/commerce-type-deletion

Prevent deletion of Commerce Types with existing content