Cache rejected tx to avoid rerequesting

Previously AlreadyHave would only prevent rerequesting transactions accepted to
the mempool or identified as orphans; if a transaction failed validation, it
would keep requesting it and validating it every time it received an inv. This
change adds a small mruset to remember some failed transactions.

The main benefit of this change is that if a bug like #3190 causes a peer to
periodically send invs for bogus transactions, we don't repeatedly getdata and
validate the same transactions until we DoS-ban the peer.

This requires a new distinction between permanent failures (that are independent
of chain state) and temporary failures; the few potentially temporary rejections
are not cached.
Merge PR 4542