Effect of bromine doping on the charge transfer, ion migration and stability of the single crystalline MAPb(BrxI1−x)3 photodetector