Extract handlers setting outside try/catch

Avoids situation where some weird error setting handlers causes a report
of being unable to load the file
Expose pluginManager to enabled plugins
Merge branch 'feature-expose-api' into dev
Merge branch 'dev' into feature-fix-like-drupal

Merges the api changes into the new hook system

Conflicts:
	lib/plugin.js