SAN FRANCISCO (Reuters) - Yahoo has demanded licensing fees from Facebook for use of its technology, the companies said on Monday, potentially engulfing social media in the patent battles and lawsuits raging across much of the tech sector.