The Functional Role of Critical Dynamics in Neural Systems