Rework flatten method: use known Python flattening

http://rightfootin.blogspot.fr/2006/09/more-on-python-flatten.html says it all
Adapted to fit with SVG / Group structure.

The main goal of the flatten method is to remove the (deeply) nested list of
Groups and make a one dimensional list of drawable items.