Bahrain's security forces say they thwarted attacks on this weekend's F1 race.