Intrinsic randomness as a measure of quantum coherence