Taming Capital Account Shocks: Managing Booms and Busts