Allow stores to cache costs

Allow stores to save and retrieve segment costs, which are now a
property of SegmentDescriptions. This allows costs to be cached when
feature weights are unchanged. It is the responsibility of the store to
know whether costs have been invalidated (since it also stores the
weights). Greatly increases the speed of re-solution, mostly due to
needing to retrieve less information from the SegmentStore.
Make cost storage and retrieval optional

Whether to store and read cached costs are now indepedent parameters for
SolutionGuarantor. By default, costs are stored (for use in analysis and
correction) but not read (since the store must take explicit
responsibility for invalidating costs when weights or parameters
change).