Fix document.dir getters and setters to (a) work and (b) conform to HTML5. Bug 151407, r=ehsan
Change tests that depended on the behaviour before bug 151407 was fixed, r=Ms2ger