Fix bad xml generation due to mismatched start/end tags

This was causing a problem with lost policy permissions when global proxy was set for a user.

Extract all xml literals into constants to avoid such errors in the future.
Fix some minor line length issues.

Bug: 12065908
Change-Id: I11d532b4aaa978a09ac562fd6b9ddce1f699a03e
1 file changed