[Runtime] Add IRI items validate for widget.

According to
http://www.w3.org/TR/widgets/#iri-attribute
http://www.w3.org/TR/widgets/#table-of-elements-and-their-attributes

The id and authorHref are IRI item, and we need validate they,
and if they are illegal they will be empty.

GURL::spec() will return an IRI string but might with a
superfluous '/' at the end, so GURL only used for validate.
[Runtime] Fix wrong write of variable name on js.

Fix it.