A Theoretical Analysis of Contrastive Unsupervised Representation Learning