Add synthetic "delivered_amount" field to payment "meta" JSON (RIPD-643)

To reduce the need for clients to have logic that checks whether the `DeliveredAmount` field is specified and using it instead of `Amount` when processing payment transactions, we synthesize the new field `delivered_amount` which always contains the amount that was actually delivered. The field is part of the `meta` information returned with a Payment transaction, and is only present if `meta` is there.

The first commit changes only the logic. The second `[FOLD]` commit unindents the code with minimal logic changes (e.g. inverting an `if`).

Reviews: @JoelKatz, @rec
You could just call it `meta` - you only use it for a few lines (and we don't generally use _ in local variables...)