Implement add-peer and new-source operations in hesobase

Implement the two minimal operations needed for creating a useable hesobase. This has a lot of related changes needed for tooling and the hesokuri.git library, so the pull request is relatively big (sorry). The individual commits are more self-contained.