Major terror bid foiled in Lahore