Add the missing polygon functionality

This changeset adds/finishes the polygon functionality as described in the documentation. The user adds points to a polygon and finishes the polygon with a double click (adding a last point with the click) or by pressing Enter.

For now, it is not possible to change the polygon after creating it.