Firms are moving their headquarters out of the metropolis at a record-setting pace amid the proliferation of remote work and growing risks of natural disasters.