Fully Persistent Spatial Data Structures for Efficient Queries in Path-Dependent Motion Planning Applications