On understanding bandgap bowing and optoelectronic quality in Pb–Sn alloy hybrid perovskites