[Android] Fix Python 3 compatibility issue in packaging tools.

* Fix the open file mode which will cause str type error in Python 3
* Use sys.maxsize instead of sys.maxint since sys.maxint is remove in Python 3

BUG=https://crosswalk-project.org/jira/browse/XWALK-1721
Merge pull request #1966 from sqliu/fix-python3

[Android] Fix Python 3 compatibility issue in packaging tools.
[Runtime] Add getter and setter support for widget preferences api

According to
http://dev.w3.org/2006/waf/widgets-api/#the-preferences-attribute
the preference items need to support getter and setter.

And if we storage getter and setter items in WidgetStorage
entity, we will produce a dead loop like :
getter=> return this[itemKey] => getter => ...
So we storage getter and setter items in _itemStorage to
avoid this dead loop.