Current and former Justice Department officials said Tuesday they were stunned and frustrated by Attorney General William P. Barr’s move to loosen internal restrictions on how and when federal prosecutors investigate certain election-fraud cases before the results are certified — and worried that Barr was aiding President Trump’s effort to cast doubt on his defeat.