Cruz wins easily, but loses the GE handily regardless of it being Bernie [more popular policies and obviously more likable, just look at how the debate went] or Hillary [who is somehow less artificial and robotic in comparison to Cruz].
Cruz smashed Sanders. All the polls immediately after the debate showed Cruz crushing him, until the Bernie Bros blindly voted that Sanders won.
As for the Republican nomination, I'm inclined to say Rubio only because Cruz thrived off of anti-Trump conservatives. Rubio was the rising star, and probably would've won New Hampshire, then South Carolina, and probably a good chunk of Super Tuesday states. The primaries probably would've been Rubio vs. Cruz vs. Paul.
Cruz had a base beyond being 'anti-trump', he had religious conservatives + a sizable number of libertarians. On the other hand, rubio's base was almost 100% anti-trump, which is why it collapsed so dramatically and quickly bled away to other candidates.
You can look at the second choice rankings in the primaries to see the evidence for this. Almost no rubio supporters had Trump as a second choice, in comparison, a much higher percentage of Cruz/Jeb/Kasich voters had Trump as a second choice.
In addition, there would have been no establishment attempts to constantly rehabilitate rubio for his repeated mistakes, the only reason why that happened is because he was the anti-turmp candidate.
You're also forgetting that Jeb and Walker would be in the picture. The argument can be made that the reason why rubio/cruz outlasted Jeb/Walker was due to their Trump avoidance strategy at the beginning of the race. Both Jeb and Walker attacked Trump at the beginning, rubio/cruz didn't attack until very late.