The layoffs will focus on human resources and its retail division, Amazon’s chief executive said in an email to employees.