registration: tune selection of levels slightly

Use one iteration for computing global transform and then never use
above level index 2 (== level 3) for computing registration.
registration: compatibility fix for Py3

xrange is not in Py3. Make use of six's implementation.