Moved event binding outside of plugin.init()

This is related to the discussion in #3026 and making plugin logic available to the rest of the framework even if the plugin isn't being used on the page.