freeTrajectoryState should return const pointer
Merge pull request #1331 from wmtan/freeTrajectoryStateMustReturnConstPtr

Multithreading fixes -- freeTrajectoryState() should return const pointer