fix a bunch of broken stuff in union/intersection types
general impl of Type.supertypeOf