Make xml_http_request? / xhr? actually return a boolean

Currently “xml_http_request” returns a booleanish value that behaves accordingly when needed but it also breaks the general convention that methods with a “?” postfix should return “true” or “false” values.

currently

request.xml_http_request? # => 0 / nil

new

request.xml_http_request? # => true / false

PR at https://github.com/rails/rails/pull/23865

Doesn't `request.xhr?` cover that?

Pretty sure this is not a general convention that Rails follows. This seemed awful familiar, a quick google search brought me to: https://github.com/rails/rails/issues/20110#issuecomment-100970600 (which suggests that this type of issue is raised often).