Replace xrange in for loop with range

xrange is not supported in python 3, so replace it with six.moves.range

Change-Id: I9356d176d2c848880fbc6e94509b4fee91a68481
Closes-Bug: #1261984
Merge "Replace xrange in for loop with range"