Normalize whitespaces of widget attributes in XML configuration.

According to widget W3C specification, the rules of getting attribute should be applied:
1, remove any leading and trailing whitespaces.
2, replace any sequences of whitespace with a single space character.

BUG=XWALK-2775