WIP: ValueCollectingVisitor

This implements a `ValueCollectingVisitor` as per issue #50.

This is not ready to pull yet, however feedback is appreciated.