Adds support for preference default value declared in XML.

Initializes preference default value from XML if available by
coercing the value to a String.

Closes #1069.