Cash and money-market accounts may feel safe, but they can still lose purchasing power when inflation exceeds their returns.