The retrenchment comes in the wake of slower growth from Google's cloud business, as well as massive spending aimed at supporting the tech giant's ambitions in AI