[Tizen] Fix bug on intalling widget failed

It is caused by temp value in local function used by outer function.
And for contructor of WGTPACKGE should set is_valid_ to false when
error happens.

BUG=https://crosswalk-project.org/jira/browse/XWALK-2403
You could also make the caller use a const reference.