Optimal Mechanism Design with Speculation and Resale ∗