Issue #2297307 by fgm: Prevent store type deletion when a store exists.
Handle delete access control in routes too.
White space / comment fixes.
Merge branch 'FGM-2297307-avoid-nonempty-type-deletion' into 8.x-2.x