[Runtime] Add dir and span support for widget

We can get right value for text items which have dir
propertie or span element in it.

This festure according to
http://www.w3.org/TR/widgets/#the-dir-attribute
http://www.w3.org/TR/widgets/#the-span-element-and-its-attributes
[Runtime] Fix getting the wrong value from widget API toString method.

According to W3C widget API specification, the widget.toString() method
should return "[object Widget]" value.

BUG=XWALK-1667
Merge pull request #1958 from CooderIan/span_dir_support

[Runtime] Add dir and span support for widget
Merge pull request #1965 from takethathe/widget-api

[Runtime] Fix getting the wrong value from widget API toString method.