Add doPrivileged block for specifyStreamHandler NetPermission

Adding these doPrivileged blocks to remove the permission entry in standalone.xml for CTS tests.