Geometry optimizations

I'm creating this pull request to review and discuss first.

Disabled Dlugozs var-len int packing, it could be reactivated if needed (tradeoff: 1% memory gain against 20% performance lost in getClosestEdge).