On the Equivalence between Online and Private Learnability beyond Binary Classification