Fix transaction fee calculation

Instead of counting addresses, count unspent transaction outputs. This
plays much more nicely with multiple addresses.