Checkstyle.
Refactor dev/QE permissions model to support other types.

Previously we only could store owner permissions in our database,
leaving us with no way to store and test other permission setups without
writing customized user services.

Transition to a model where we store a PermissionBlueprint in the
database, which is just enough information for the PermissionFactory to
create a Java Permission object with the data it needs. The Permission
object remains responsible for checking if it has access to some entity.