Google’s sale of Motorola to Lenovo may appear to mark the close of a dark chapter in the search giant’s history — the failure to succeed in the hardware business.