X-rays from recombination of bare ions with electrons in an electron cooler