Resistance switching in polycrystalline BiFeO3 thin films