A huge new study pinpoints the exact amount of coffee to maximize health benefits and minimize sleep problems.