random_gaussian()
MetropolisSimulation is a template on CounterType

before unsigned int might have overflowed relatively soon.  this fixes that.
safe_fmod()