An Economic Theory of Planned Obsolescence