[convex_hull] Generate consistent results for closed and open Geometries.

The result differ only for the last Point duplicated for closed.
This code should be faster than the original since any condition isn't checked inside a copying loop and the end iterators are created only once.
[test][convex_hull] Add test for MultiPoint for which convex_hull() should return invalid Polygon.
[convex_hull] Generate "proper" number of Points also when invalid Output is generated.

E.g. for 1- or 2-Point MultiPoint input the Output is a 0-area Ring (Point-like or Segment-like respectively). After this change it should contain "proper" number of Points (3 for open, 4 for closed). The additional Point is added by duplication of the first one.