On Contrastive Representations of Stochastic Processes