Optimal purification of single qubits