Use StringToUuid() which does not generate exception for empty string.
Use the right format for UUID strings (8-4-4-4-12).
Fix some compile issues found using -coverage option to gcc.

Change-Id: Ib10221e797c9b1df285b8dc4bfcd472fdb601100
Closes-bug: 1403347