Optimization for pickling random states

-- Addresses https://github.com/numpy/numpy/issues/4763