A Framework for Coalescent Simulation