Use rack middleware to reject invalid UTF-8 bytes

Tracker: https://www.pivotaltracker.com/story/show/59741752

This will prevent requests with strange characters in them raising 500 errors.