Error thresholds of replication in finite populations mutation frequencies and the onset of muller's ratchet