Learning a State Representation and Navigation in Cluttered and Dynamic Environments