Characterization of measures associated with orthogonal polynomials on the unit circle