Extension of measures: Classical and Quantum