Create ajax.js

Abstract ajax (xmlhttprequest) implementation