(Reuters) - Dominion Energy Inc said on Wednesday it would buy Scana Corp in an all-stock deal worth about $7.9 billion, offering the troubled utility a way out from dealing with spiraling costs and unhappy customers.