Convert transaction pool errors to their own type.

This allows the caller to distinguish if the error is because of a rule
violation or due to something actually going wrong.