Quasi-thermal noise spectroscopy in Earth's magnetosheath: theory and application to plasma diagnostic on wind spacecraft