[EOSIO/eos] Identical transactions not allowed in smart contract (#5315)

The IDs of «1» or «2» are the user defined IDs to store and retrieve the deferred transactions. However the real transaction id is the hash of the transaction itself, as defined in transaction.cpp:

«`
transaction_id_type transaction::id() const {
digest_type::encoder enc;
fc::raw::pack( enc, *this );
return enc.result();
}
«`
This transaction id needs to be unique as well.