Investors are increasingly reluctant to lend to coal companies as power plants switch to more environmentally friendly fuel.