Dollar-cost averaging turns market volatility from a threat into an advantage. Learn how it works, when it beats lump-sum investing, and how to apply it automatically.