AppOps: Fix resetAllModes() in AppOpsService

  *) Array iteration with inline deletion was broken
     causing PrivacyGuard reset not to work properly.

  *) Kanged fixed code from Kitkat

Change-Id: If36d38f9199e6282fe52eabc32cd652d8aca86fe