Local and nonlocal balance laws and asymptotically compatible discretizations