Section::inheritedProperties: use copy_if instead of use

Lambda the ultimate!
Section::findSideways: replace loop with erase-remove idiom

Down with the loops! ;-)
Section::findRelated: replace loop with erase-remove idiom

And extract some duplicated code into a inline function
Merge pull request #291 from gicmo/cleanup_algo

beautiful!