Support pickling of xrange and ensure limits match CPython