[tests] tidy up blocktools.py
[tests] tidy up blocktools.py

Moves function comments to docstrings, and moves the module-level
constant to the top of the file.

chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin