Yes, of course he was referring to the Pope - he said so explicitly. But the point he made was broader than that - he said that a leader should not question another man's faith.
And he's right. The Pope should not have questioned Trump's faith. And, Trump should not have questioned Cruz's faith.
That is fair enough. The man is not perfect. No man is.