Pepsi has apologized for a controversial advertisement that borrowed imagery from the Black Lives Matter movement, after a day of intense criticism from people who said it trivialized the widespread protests against the killings of black people by the police.