James River Coal Co. laid off a quarter of its workers. Consol Energy Inc., which has mined coal since the Civil War, sold five Appalachian mines, representing nearly half its coal output. And more than a half-dozen U.S. coal-mining companies went under, beset by new environmental rules and competition from low-cost natural gas. But coal isn’t going away. Coal remains the biggest source of fuel for generating electricity in the U.S. and coal exports are growing fast.