A Theory of Robust Population Coding for Sensory Systems