Add a cost model factory

Some refactoring to anticipate two needs:
* More accurate costing for FDB random access latencies.
* Plan generation randomizer.

This branch does not completely addresses either of these. I suspect that just treeScan may not be enough to model the difference in B-tree access. And, as noted in the comment, some setup / lifecycle control is almost certainly needed in the test harness for the randomizer. Still, this should localize those future changes somewhat.