The development leaves Mr. Trump on course to be the first president to take office convicted of felony crimes