Fix boilerplate
Tidy up forms

* Move logic for committing changes into own method
* Just redeclare moodleform::set_data() to set defaults from a report
  object, no need to add another method and screw with
  moodleform::$_customdata
Document and tidy renderer
Work with a report object instead of raw DML objects from now on