Cr doping-induced structural phase transition, optical tuning and magnetic enhancement in BiFeO3 thin films