The X-shooter Spectral Library (XSL) - I. DR1: Near-ultraviolet through optical spectra from the first year of the survey