Replace xrange in for loop with range

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

Closes-Bug: #1259978

Change-Id: I321380693d45f7d48f52da2d0f8e4c137763ab0c
Merge "Replace xrange in for loop with range"