Nyall Dawson a22422c4bf [FEATURE][API] Add parts iterators to QgsGeometry
This allows easy iteration over all the parts of a geometry,
regardless of the geometry's type. E.g.

geometry = QgsGeometry.fromWkt( 'MultiPoint( 0 0, 1 1, 2 2)' )
for part in geometry.parts():
  print(part.asWkt())

geometry = QgsGeometry.fromWkt( 'LineString( 0 0, 10 10 )' )
for part in geometry.parts():
  print(part.asWkt())

There are two iterators available. QgsGeometry.parts() gives
a non-const iterator, allowing the parts to be modified in place:

geometry = QgsGeometry.fromWkt( 'MultiPoint( 0 0, 1 1, 2 2)' )
for part in geometry.parts():
   part.transform(ct)

For a const iteration, calling .const_parts() gives a const
iterator, which cannot edit the parts but avoids a potentially expensive
QgsGeometry detach and clone

geometry = QgsGeometry.fromWkt( 'MultiPoint( 0 0, 1 1, 2 2)' )
for part in geometry.const_parts():
   print(part.x())
2018-11-20 05:05:37 +11:00
..
2018-10-24 11:13:54 +02:00
2018-10-16 12:52:48 +02:00
2018-11-04 19:22:09 +10:00