Pinterest just crossed $1 billion in quarterly revenue. The bet that made it work was not social media. It was search.