Move event observer methods into separate namespaced class.

Moodle will take care of auto-loading it for us.