factored out common methods into GeometricOpertaions.pde

https://github.com/whyi/SketchFormer/issues/23
I know this method is for the refine operation, let's just include this in this PR as there will be another PR shortly.