[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
[Runtime] Fix can not ignore preference items when parse.

According to
http://www.w3.org/TR/widgets/#the-name-attribute-1
an preference item should have name attr, or it should be
ignored, and if there are two or more preferences used same
name, the first one should be took when others shoud be
ignored.
Roll in new version of Blink 3cf743afc1a77a1141f08897c4f2c3b805124f25

Patch :
- Enable SubpixelFontScaling by default.
Merge pull request #1971 from darktears/roll-font

Roll in new version of Blink 3cf743afc1a77a1141f08897c4f2c3b805124f25
Merge pull request #1969 from CooderIan/fix_preference_handle

[Runtime] Fix can not ignore preference items when parse.
Merge pull request #1966 from sqliu/fix-python3

[Android] Fix Python 3 compatibility issue in packaging tools.
[Runtime] Fix identify the app package type while loading it.

Current implementation identify package type by configure document
name, 'manifest.json' will be recognized as XPK package, and
'config.xml' will be WGT package, but it's not always right if both
'manifest.json' and 'config.xml' exist in one package.

This patch add a package type parameter when loading it, to make sure
that unpacking and parsing package use the same package type.