CAFe: Unifying Representation and Generation with Contrastive-Autoregressive Finetuning