Converted $.each() to plain for() loop in GuidGenerator

$.each() on strings fails in jQuery 1.9.

Change-Id: I71a7a0d6a861da3a262c8b0485ad7c2e6bf857b7
Merge "Converted $.each() to plain for() loop in GuidGenerator"