fix bug in edge swap triangle normal handling

there was code that tried to preserve the normals,
but it assumed the quad was aligned with the
old triangles.
add a function that ensures the latter and
a more efficient check for possible normal
inversion after that.
Merge branch 'master' of https://github.com/SCOREC/core