module: Write documentation in doc/ on how to write a module

Write a small file in doc/HACKING/ on how to proceed with a module. The current template is the freshly merged dirauth module.

This would be for now mostly related to the build system and the code standards.