Install/remove hooks

Refresh:
https://github.com/snapcore/snapd/pull/3526

UPDATE: after some face-2-face discussion we decided not provide revert hooks at this moment as those are more tricky and we need to understand real use-cases better before introducing them.