Nanoscale x-ray imaging with high spectral sensitivity using fluorescence intensity correlations