Tracking the changes of 'dir'

This is some workaround, proposed in order to solve the problem with tracking the changes of property 'dir' (issue #340). Reason of the problem described in #404 by Bill: "There are some platforms where the custom setter for a native property won't get called, and thus we get no notification that it changed."
There are 3 options for 3 types of platform:
1) If platform supports variant of MutationObserver, create correponding observer;
2) else if platform supports DOMAttrModidfied event, add listener for this event;
3) else add listener for DOMSubtreeModified event (direct getters for 'dir' will not work correctly, but isLeftToRight() can be modified to return correct results).