Amazon is laying off almost 700 corporate workers based in New York City as part of the company's wider restructuring.