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.