Quantum theory of single subfemtosecond extreme-ultraviolet pulse measurements