GenCAD: Computer-Aided Design Generation with Transformer-based Contrastive Representation