XDS: a flexible beamline for X-ray diffraction and spectroscopy at the Brazilian synchrotron.