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

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

Change-Id: I71a7a0d6a861da3a262c8b0485ad7c2e6bf857b7
(cherry picked from commit 6ab0fc3b55ad70a341f34a98cd3d6d1fd0a37461)