[Runtime] Reconstruct load config xml.

In old logic we use a simple depth traversal to load xml, but it
hard to apply all rules according to
http://www.w3.org/TR/widgets/#step-7-process-the-configuration-document
So I reconstruct the logic of load config, and now it was more
comply with the standard process rule.

Besides this process will make the value we storage in DB
clearly.