HQ and telehash reorg

This is incomplete yet, a work in progress.