Random tree sampling + legacy code

Added support for random sampling of a weighted discrete distribution
using a tree map.

This commit also includes a bit of legacy code (#2).
Renamed StereoMatcher to StereoMatching

...in preparation for code extraction into classes. The main class
should be called StereoMatcher and the sketch can't have that same name.