Optimality and limitations of audio-visual integration for cognitive systems