A duality theorem for ergodic actions of compact quantum groups on C*-algebras