topic: make _nbheads() skip branchmap entries that aren't just a branch
This code should've been updated when branchmap started containing items in the new FQBN format, but it's better late than never.
This fixes failure in test-single-head-obsolescence-topic-B3.t on hg <= 6.0.