[bug 950358] Beefen up the token auth code

This adds some exception handling and other things that beefen up the
token auth code to be more resilient. It'd be super if this alleviates
whatever problem is occurring that's then causing Raven to get all fussy
mcfussypants.

The tests all pass, but I'm not sure how to test the token auth code manually. I'm pretty sure these changes are all correct, but they definitely could use @mythmon to look them over.

I don't know that these changes will fix our object_name problem, but they're probably good to do anyhow.

r?