Facing stiff competition in the social media market, Snapchat’s developer is bringing its expertise in augmented reality to advertisers, online stores and, surprisingly, bricks-and-mortar retail.