Switch the extra data in dtype transform to non-const

and implement ndobject.cast in terms of ndobject.ucast