Added check of udmg defs

Added an additional check to ensure variable is not defined inside the loop.
Added and used usedIndices set.

The usedIndices set consists of all the indices that have already been handled.
Modified method signature for getLoopIndices

The method now returns void and takes an additional parameter which is a map from IndexStruct to Statement .
The Statement will either be a for statement or a parallel for statement.