High resolution determination of local residual stress gradients in single- and multilayer thin film systems