Piping prune function through the VersionedStore factory method

Alternatively one could also pass a PrunedSpace directly, though I prefer passing a function. Either way it seems useful, as currently the only way to prune is to extend BatchedStore and override.