Serialize WebOb errors as JSON if the client requests it via an Accept header.

Change-Id: I32040eff4259daf7a0e58b81ce861758d1d14bd9
Fixes bug 1324134
Merge "Serialize WebOb errors as JSON if the client requests it via an Accept header."