China's Baidu and Qihoo 360 sign pact meant to resolve dispute