[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.
Merge pull request #1969 from CooderIan/fix_preference_handle

[Runtime] Fix can not ignore preference items when parse.