remote-hg: implement custom checkheads()