HSBC will cut costs by as much as $5 billion, laying off as many as 25,000 staff, the banking behemoth has told investors.