Add a release script

The Makefiles were mostly filled with a complex shell script written in
m4sh. Moving that out into a separate script helps debugging and
compatibility, and in general makes life better.

This also improved the DEVELOPERS.md documentation to be more clear
about the steps of a release, including third-party packages.
Run hooks on rcdn as indicated by the manpage.
Bug fix: make sure IFS isn't left in an incorrect state when the output of lsrc is empty
Add tests to check that hooks run on rcdn by default