fun <P> extractAmountsDue(product: Terms<P>, states: Iterable<State<P>>): Map<<ERROR CLASS><PublicKey, PublicKey>, Amount<Terms<P>>>
Convert a list of settlement states into total from each obligor to a beneficiary.
Return
a map of obligor/beneficiary pairs to the balance due.