Replace removed items in Python3

Built-in function xrange and type long were used in Python 2,
were removed in Python3. Python3 uses range and int. Here we use
six.moves.range and six.integer_types.

Implements: blueprint make-python3-compatible
Change-Id: I770de45f6178086abe54e2aca2b554c14c68c00e
Merge "Replace removed items in Python3"