When Facebook bought Instagram for $1 billion in 2012, it seemed like a big gamble for an unproven little app. Six years later, that little app—along with Messenger and WhatsApp—are serving as Facebook’s safety net for a future that could find its flagship service on the sidelines.