Gillard orders inquiry into terrorism case that slipped security