Thread safety cleanup in Geometry

Make the return value of a function be
a const ref instead of just a ref.
Eliminates a potential thread safety problem
reported by the clang static code analyzer.
Merge pull request #3307 from wddgit/threadSafetyGeometryTrackerGeometryBuilder2

Thread safety -- Cleanup in Geometry