Move the notes on writing tests out of HACKING into a new file, and improve them.
Many of the testing notes in the HACKING file were in duplicated in two places in that file! This change removes that duplication. It also adds new sections on “Where should I put a new test?” and “TestCase and its subclasses”, and others like “Test feature dependencies” have been expanded. The whole document has generally been edited to be a bit more coherent.