Fix race condition for test_flavors_extra_specs

Use rand methods to create flavor name and id so
parallel running of xml and json classes will not
fail with conflicting names.

Also fixes bug 1220034

Change-Id: I266f4a55e6f8c5a0e063164f656b09b4140c5866
Merge "Fix race condition for test_flavors_extra_specs"