[#2750] Add 'state' to db_to_form_package_schema()

Fixes #370
[#2750] example_idatasetform no need to import model

Extensions no longer need to pass model and session when calling action
functions.
[#2750[ Add some comments to example_idatasetform