Strategy Pattern for XHR in make-api.js

https://bugzilla.mozilla.org/show_bug.cgi?id=864433