Reduce the number of calls to collect
Reduce the number of calls to collect

We were calling collect way too often, which was slowing things down. Also
broke collect into separate subfunctions so we can see better when one of
them becomes a bottleneck.

hercules-team/augeas,kunkku/augeas,bkearney/augeas,hercules-team/augeas-do-not-use,kunkku/augeas,jjlin/augeas,MikaelSmith/augeas,mlichvar/augeas,jasperla/augeas,lutter/augeas,ptoscano/augeas,camptocamp/augeas,pevalme/augeas,dafugg/augeas,camptocamp/augeas,ptoscano/augeas,bkearney/augeas,jtopjian/augeas,GeoffWilliams/augeas,raphink/augeas,raphink/augeas,pevalme/augeas,hercules-team/augeas-do-not-use,domcleal/augeas,kumy/augeas,hercules-team/augeas-do-not-use,jjlin/augeas,GeoffWilliams/augeas,manandbytes/augeas,kumy/augeas,kumy/augeas,kumy/augeas,mchf/augeas,dafugg/augeas,dafugg/augeas,ptoscano/augeas,jtopjian/augeas,domcleal/augeas,domcleal/augeas,kunkku/augeas,mlichvar/augeas,mchf/augeas,bkearney/augeas,manandbytes/augeas,mlichvar/augeas,camptocamp/augeas,lutter/augeas,MikaelSmith/augeas,lutter/augeas,bkearney/augeas,jjlin/augeas,hercules-team/augeas,camptocamp/augeas,jasperla/augeas,pevalme/augeas