Use six.moves.range instead of xrange

In Python 3, module "xrange" doesn't exist any more.
To support both Python 2 and Python 3, "six.moves.range"
should be used instead.

Change-Id: I9dcf79011a4b2672e4ba55298aa22cab5e2292ff
Closes-Bug: #1403447
Merge "Use six.moves.range instead of xrange"