glretrace: swizzle locations into uniform arrays.

Where slot number is inferred.

Fixes issue #139.

v2: Prevent dereference of end() iterator -- Jose