Fix a problem where shared pointers are wrongly marked as expired.
Added a test case for vertex manipulation.

This is for a problem in the vertex manipulation code. If a face would have two consecutive edges as the result of a vertex operation, the operation would be cancelled, which is wrong: The two edges have to be merged.