From optimal transport to generative modeling: the VEGAN cookbook