Moodle 2.7 compatibility

Moodle 2.6+ are sensitive to closing PHP brackets (especially when there are new lines at the end of the file).

The :addinstance capability string was missing.

Additionally, Moodle 2.7+ requires the use of $plugin in version.php (backwards-compatible with 2.5, 2.6).