Apple, which set up its first office in New York a decade ago, is expanding to another building in Manhattan. And Google and Amazon are stitching corporate campuses together in the city more quickly than anywhere else.