[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
Yes, that's what I want. After testing on my local machine for the new change, I will resend the PR.
Thanks to point.