Implement `==` on `Type::Value` and `Attribute`

This was a small self contained piece of the refactoring that I am
working on, which required these objects to be comparable.
Use *_transaction methods in TransactionManager

Use `commit_transaction`/`rollback_transaction` on
`within_new_transaction` method, so they make sure they `pop` the
transaction from the stack before calling the methods `commit`/`rollback`.
Fix regression on after_commit in nested transactions.

after_commit should not run in nested transactions, however they should
run once the outermost transaction gets committed. This patch fixes the
problem copying the records from the Savepoint to its parent. So the
RealTransaction will have all records that needs to run callbacks on it.

[fixes #16425]
Merge pull request #16435 from arthurnn/after_commit_run_on_top_level_trans_master

Fix regression on after_commit in nested transactions. (master)
Unused ivar in a test suite
Avoid polluting String class globally in a test case
Avoid mutating the constants in a test case
[ci skip] re-worded section on CookieStore to make it more readable.
Merge pull request #16523 from tomkadwill/cookie_store_rewording

[ci skip] re-worded section on CookieStore to make it more readable.
Merge pull request #16517 from sgrif/sg-comparable-attributes

Implement `==` on `Type::Value` and `Attribute`