Cleanup: Use urlresolvers.resolve in captcha middleware

This is a change from evernote/a76f657.