Bug 1048098: remove redundant flushPermissions, flushPrefEnv from tearing down procedure. r=btian, r=echen