Bug 852848 - Better Oauth solution, gaia changes [DONT MERGE]

This is a POC using Fabrice's patch for gecko in bug 852848, uploaded to receive feedback.