Involvement with the mine, which critics say threatens endangered species, was exposing the London-based bank to reputational damage