Plugin, model & form helper fixes

* Make sure the same plugin is not loaded twice, and log a warning.
* Added a new model method: ensureIds, which enables you to
  make sure certain records with the given id exist
* Fixed the form helper