Learning thresholds lead to stable language coexistence