(Reuters) - Dominion Energy Inc said on Wednesday it would buy Scana Corp in an all-stock deal worth about $7.9 billion, offering the utility a way out of dealing with unhappy customers and federal investigations following a failed nuclear project.