fix a bug that unused nodes were not removed in a new extracted mesh.
Merge pull request #412 from norihiro-w/fix-remove-elements

fix a bug that unused nodes were not removed in a new extracted mesh.