Nonlocal critical state model for hard superconductors