Do not register hooks and eventhandlers twice, closes #727, closes #484.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | --
| Fixed tickets | #727, #484
| License       | MIT
| Doc PR        | --

This relies on #1080 to be merged.