Add 'activate' and 'deactivate' plugin hooks.  Issue #349
Merge pull request #350 from willynilly/issue_349

Fix Issue #349