Tunable bandgap in hybrid perovskite CH3NH3Pb(Br3−yXy) single crystals and photodetector applications