[Tizen-Security] register permissions of web appliation(Just for review only, not merge)

* When installing applicaiton, installer should set permissions into
  cynara db. Also installer should set SMACK label for resource files.
  When updating and removing applicaitons, the permissions need updated.
  This patch is picked from PR#2397.
declare `pkg_id` as close as first use.