Merge pull request #14393 from chrisfinne/persisted_exception

AR .persisted? throws SystemStackError for an unsaved model with a
custom primary_key that didn't save due to validation error

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/test/models/movie.rb