Physically recurrent neural networks for path-dependent heterogeneous materials