Fixed references to doc/HACKING

This patch replaces all references to `doc/HACKING` with `doc/HACKING.md`, to
include the one in `setup.py` that was preventing a successful build. Some
trailing whitespace was incidentally removed.