Setup for optimized grazing incidence x-ray absorption experiments on thin films on substrates