The contribution and weighting functions of radiative transfer – theory and application to the retrieval of upper-tropospheric humidity