add a restrict function which removes all keys from an intmap outside a range. This necessitated explicit argument types in testmachine.py. Remove intmap_range testing until range representation becomes cheaper or I come up with a better idea for generating them