Upstream Geometry Bugfixes

Hi Thomas,
we ran across 2 disturbing bugs so that occ crashed completely during geometry creation. I pulled these fixes from the upstream occt.git. Merge it in whatever branch you'd like.

rainman110