Modeling and prediction of molecular properties. Theory of Grid-Weighted Holistic Invariant Molecular (G-WHIM) descriptors