Fix an issue where router can't recognize downcased url encoding path.
Merge pull request #12276 from kennyj/fix_12269

Fix an issue where router can't recognize downcased url encoding path.
do what the superclass does in the case that objects do not match
ActiveRecord::Base#<=> has been removed.  Primary keys may not be in order,
or even be numbers, so sorting by id doesn't make sense.  Please use `sort_by`
and specify the attribute you wish to sort with.  For example, change:

  Post.all.to_a.sort

to:

  Post.all.to_a.sort_by(&:id)
support objects with blank string primary keys
remove unused variable
NullSessionHash#destroy should be a no-op

Previously it was raising a NilException
Merge pull request #12279 from jbaudanza/reset_session

Calling reset_session inside of a controller with a NullSessionHash raises a nil exception.