Goal-Directed Planning for Habituated Agents by Active Inference Using a Variational Recurrent Neural Network