Fix notifications being messed by screen locking

A very strange issue where notifications alert would go crazy after
locking/unlocking the screen (because on 3.10+, extensions get deactivated on
screen lock and reactivated on screen unlock). Probably related to the fact
that the signals were not being disconnected on deactivate. The strange part is
that it was not reproducible by disabling/enabled it by hand.

This refactors some code by:

* Move some init code to a init() function
* Store signal ids on enable() to disconnect them on disable()
Empty commit for 3.12 tag