CoBIT: A Contrastive Bi-directional Image-Text Generation Model