Revert "use request.xhr? with newer Sinatra"

This reverts commit cc6b4c055f262b9a5cb5c26e4daf610c550c7d71.
Factor out 'is request asking for json?' into route helper
Use updated-for-Sinatra-1.4 method of testing accept header.

Cannot use request.accept?() because many browser requests
automatically include */* which causes that method to
return true.
Whitespace, hooray