Hundreds of jobs are set to be cut after executives at Google and its parent company Alphabet pledged to reduce costs.