Various bug fixes and addition of ajax

Various bug fixes and improvements mostly at the core implementation.
Added the new Ajax module based off of XmlHttpRequest Level 2.
The ajax module still has a problem here and there with PhantomJS which
should be fixed when PhantomJS 2.x comes out as it will be using Qt5.