Previously a module that was removed (not purged) and then reinstalled
did not enable itself causing some confusion. Now, we maintain state by
moving the module symlink to .removed on package removal.
If the package is reinstalled the link is restored, if purged the link
is completely dropped.
Fixes issues during upgrades from non dynamic nginx versions (jessie).
When multiple modules are installed together for the first time,
nginx reload might fail because, at that time, the configuration
might reference directives provided by module packages that are
not yet configured.
There are also other cases where the instant reload might break,
using triggers seems like the correct way to proceed.
Since the modules don't depend on nginx binary packages
yet, there are some edge cases that /run/nginx.pid is not empty
and /usr/sbin/nginx doesn't exist.
We introduce a dh_nginx helper script. For now dh_nginx
will only be used in the nginx source but when are confident
about it will ship it in a nginx-dev package.