Sweeping bipartisan legislation seeks to harden U.S. energy infrastructure against hackers and sabotage as threats surge.