[WIP] Scheming support

Adding package_type as a variable passed to package templates and group_type to Group/org templates. This lets ckanext-scheming do its custom edit form and view thing.

Also planning to clean out some old code while I'm digging around the package controller.

(This issue is a placeholder for an upcoming PR that depends on #1659 )