Nonlocal variational formulations of elastoplasticity