Easy to use extension method to turn a flat list in to hierarchical data.