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]

review @rafaelfranca @chancancode
this should be applied on 4-0-stable too.
I will work on a different fix for master, as the code is different. 
This is a bit too clever for my taste :)

Why do we need to delete the records from this array anyway? `rollback_records` doesn't seem to do that.

But if we *have* to for some reason, I'd rather do a `records.each` followed by a `records.clear`