First usable version of workflow support for database module.

All elements are editable and state transitions work.
One element is still missing at this point, that is e-mail notifications about state changes.
First usable version of workflow support for database module.

All elements are editable and state transitions work.
One element is still missing at this point, that is e-mail notifications about state changes.
Merge remote branch 'origin/MOODLE_22_STABLE' into m22_mod-data-workflow
Cleanup of old development code.
Added support for e-mail notifications about state changes.
For each state it is configurable to send e-mail to creator
of the record and/or to the supervisor(s) of the database
(users having 'mod/data:superviseworkflow' capability).
Fix to prevent using the same names for actions having the same start state, added local Polish translation.
Merge remote branch 'upstream/MOODLE_22_STABLE' into m22_mod-data-workflow
Fixed display of empty workflow list, fixed removal of workflow without defined states.
Merge remote branch 'origin/MOODLE_22_STABLE' into m22_mod-data-workflow
Merge remote branch 'origin/MOODLE_22_STABLE' into m22_mod-data-workflow