For the past two years Google has been trying, without success, to develop a social-networking system to compete with Facebook, the social-networking powerhouse that keeps amassing an ever-bigger audience and siphoning away billions of dollars in online ad revenue.