The microeconomics of the allocation of teachers' time and student learning