UniCoD: Enhancing Robot Policy via Unified Continuous and Discrete Representation Learning