Yahoo threatens Facebook as patent war looms