Improve delete part feature for polygon

This PR allows to delete a part or a ring by clicking anywhere inside the part or the ring, while currently it is  restricted to the boundary.

@3nids : This is the new PR to replace the PR #1243 I botched up.