Fixed a bug where AR::RecordNotSaved loses the given error message

This was extracted from #17806 that had an improvement and a bug fix. This is the bug fix.

Since 3e30c5d, `AR::RecordNotSaved` started ignoring the given error message. This commit changes `AR::RecordNotSaved#initialize` to not ignore the given error message.

Doing `create_or_update || raise(RecordNotSaved.new(nil, self))` in `ActiveRecord::Persistence` looks weird, but I'll send another pull request to improve it as soon as this one is merged.

cc @arthurnn
Just saw that there are. I think we should always pass `record`