xbps_register_pkg: do not modify the transaction pkg dictionary, use a copy instead.

Due to not using a copy the replace tests were failing at the configure phase,
because the "transaction" object was removed.