Implement makeset and union. More efficient setp.