Four-state reference-frame-independent quantum key distribution using heralded pair-coherent sources with source flaws