It will come to a plea deal. Clinton steps down from the campaign and serves no time.
I bet it goes down like this. Hillary goes to the convention and picks Joe Biden as her vice president. The convention elects the team, shutting out Bernie Sanders. After the convention, Clinton steps aside and Joe Biden goes to the top of the ticket and picks another vice president (ala George McGovern, Eagleton and Shriver).
It wont work for them, but its the only straw the dims have to grasp.
That's about the only "orderly" way to get there. If Hillary drops out before the convention, it creates tremendous uncertainty and disorder at the convention. There would be no plausible way to stifle Sanders, without turning off a huge chunk of DEM voters.
The first plea bargain in history where the accused agrees not to be President to avoid prison time.
LOL.