[#370] Add 'state' to db_to_form_package_schema

Fixes #370
[#375] Add isopen, license_url, license_title to db_to_form_package_schema

Fixes #375
[#372] Add group description to db_to_form_package_schema

Fixes #372
Add default_tags_schema to form_to_db_package_schema

This fixes lots of "input field __junk was not expected" when running
the ckan tests with an IDatasetForm plugin active (and hence the
form_to_db package validation active).
[#390] Don't put api version in context when creating datasets in web ui

The form_to_db_schema() methods of IDatasetForm plugins were not getting
called when creating datasets in the web interface, if the IDatasetForm
plugin inherits from DefaultDatasetForm.

The reason was that DefaultDatasetForm's form_to_db_schema() method
deliberately doesn't call the method if the dataset is being created via
the API, and the package controller's new_resources() and new_metadata()
methods (for the new three-stage dataset creation) put the API version
in the context, so DefaultDatasetForm thinks it's being used over the
API.

Change the package controller to not put the API version in the context.

Fixes #390.
Merge branch 'master' of github.com:okfn/ckan into idatasetform-fixes
Fix DefaultDatasetForm's check_data_dict()

Some recent commits (I think maybe ec8f69c and b6ccfca) caused
DefaultDatasetForm's check_data_dict() method to start raising Integrity
Error when creating a dataset using the web ui. Make check_data_dict() a
bit more liberal so it doesn't raise these errors anymore.
Update a couple of tests broken by commit 0f7d6a2

These tests relied on DefaultDatasetForm's check_data_dict throwing an
error, but since commit 0f7d6a2 made check_data_dict more liberal it
wasn't throwing the error anymore, tweak the tests to submit forms that
check_data_dict will still throw an error for.
Merge branch 'master' of github.com:okfn/ckan into idatasetform-fixes
default to not-broken navl validation

But, frankly all of pull request #2671 is suspect
[#406] Don't strip id's from extras in validate()

db_to_form_package_schema() (which is only used if an IDatasetForm
plugin is active) was stripping the "id" keys from package extras, which
then causes some tests to fail. Not sure if just the tests were
crashing, or if some ckan pages were also crashing. Anyway, this commit
means they don't get stripped anymore.

Fixes #406
Revert "[#406] Don't strip id's from extras in validate()"

This reverts commit ecfacbbc41d85bc4a83bd3ac008f185ec31b9185.

It's fine to strip IDs from extras, extra IDs are never useful or needed
by users. Any tests that are failing (or templates that are crashing,
etc.) by trying to read extra IDs should be fixed to not read extra IDs.
[#406] Fix some broken tests

These tests were failing when run with an IDatasetForm plugin active
because they're trying to read extra IDs, which they shouldn't do.
Change the tests to not read extra IDs, now they pass.

See commits ecfacbbc4 and e6acbd4bc645.
[#407] db_to_form_package_schema don't strip keys

Add empty lists to db_to_form_package_schema() for several keys that
normally appear in dicts from package_show, but that were being stripped
from thos dicts when db_to_form_package_schema() was used (i.e. when an
IDatasetForm plugin was active). Fixes #407.
[#415] db_to_form_package_schema() don't strip keys from resource dicts

Add several keys to the 'resources' subschema in
db_to_form_package_schema() so that validation doesn't strip the keys
from the resources dicts. This fixes a test that was failing if run with
an IDatasetForm plugin active, and may also fix some template crashes
when an IDatasetForm plugin is active if people are accessing these
resource keys in their templates.

Fixes #415.
Remove free_tags_only from db_to_form_package_schema()

Remove the free_tags_only converter from db_to_form_package_schema's
tags subschema.

This fixes a couple of tag vocabularies tests that were failing.

Not sure if this at the same time breaks something that we don't have
tests for, we may have to put this back in later if we find a problem.
Delete some unhelpful comments

Not clear what these comments mean or whether it's still true.
navl.validate: unflatten before restoring empty lists
navl.validate: fix key names in restored empty lists
[#375] Add license_title back to db_to_form_package_schema()

Looks like this got removed by accident, so license titles weren't
showing on dataset pages.