In a bid to juice its online business, Wal-Mart agreed Monday to acquire Jet.com in a deal valued at about $3 billion.