All-fiber self-compensating polarization encoder for quantum key distribution