Quantum confinement effects on the harmful-gas-sensing properties of silicon nanowires