More helpful error message when instantiating an abstract class

Calling a literal ActiveRecord::Base.new raises NoMethodError,
since it ends up calling Class.abstract_class? which does not exist.
Similarly, instantiating an actual abstract class hits the database,
when conventionally it should immediately throw NotImplementedError.

ActiveRecord::Base can't be made abstract without breaking many,
many things, so check for it separately.
Refactored and removed unnecessary lines in the test case
Merge pull request #9596 from choudhuryanupam/master

Refactored the code to remove irrelevant lines
Merge pull request #9595 from senny/remove_non_breaking_spaces

replace non-breaking spaces with normal spaces [ci skip]
Merge pull request #9545 from senny/9535_secure_password_blank

`has_secure_password` is not invalid when assigning empty Strings
Merge pull request #9474 from HonoreDB/master

More helpful error message when instantiating an abstract class

Conflicts:
	activerecord/CHANGELOG.md
test case for `serialize` default values.

Closes #9110