Introduce the pruneForest

This function allows us to keep only the roots, and discard the
redundant children after building a 'Forest'.
4 jobs for adinapoli/issue-342 in 100 minutes and 31 seconds (queued for 4 seconds)
Status Job ID Name Coverage
  Cabal
passed #18749
cabal

00:41:22

 
  Stack
passed #18750
stack

00:07:17

 
  Bench
manual #18751
allowed to fail manual
bench
 
  Test
passed #18752
test

00:51:51