Bands, resonances, edge singularities and excitons in core level spectroscopy investigated within the dynamical mean-field theory