Add simple replace-by-fee logic to mempool.

Replaces transactions if a new transaction is seen with a higher fee,
specifically both a higher fee per KB and a higher absolute fee. The
fees are not calculated recursively; to avoid DoS attacks transactions
that have been spent will not be replaced.

Thanks-to Zeilap for code review and suggestions.