Optimal Policies for a Generational Garbage Collector with Tenuring Threshold