Add branch info to getchains.

Add additional result fields to getchains output that show the branches
connecting the heads to the main chain.