Reverts changes to Rails.version made in #8501

`Rails.version` already existed before #8501 and returned a string. Changing it to return a `Gem::Version` caused some compatibility problems.

This pull request reverts the changes made to `Rails.version`.