Analytic solutions for optimized ellipsometric measurements of interfaces and surface layers in thin film structures