Time-Space Tradeoffs and Query Complexity in Statistics, Coding Theory, and Quantum Computing