[#1163] Use ckan.model.core.State instead of ckan.model.State

With this change, we're able to avoid having to load ckan.model inside methods,
to avoid circular dependencies.