Fundamental limits and optimal uses of data in modern learning problems