HSBC says it will phase out financing of thermal coal by 2040