Theory and simulation of high-energy ion scattering experiments for structure analysis of surfaces and interfaces