Google said it is buying a Manhattan office building for $2.1 billion, one of the clearest signals yet of big technology companies’ growing appetite for office space, even as these firms embrace remote work.