EU Court of Justice rules UK can halt Brexit