de-dupe the requestHandler function

Six identical copies of 'function requestHandler' were found in the code base.

This commit slims the number down to three. It appears that this part of
the code is not covered by the test suite currently, perhaps because it
makes remote HTTP calls.

I confirmed the change with manual before/after tests.

If geocode.js and featureservice.js used request.js, it appears that perhaps the situation could be de-duped further.