The president suggested that employees who worked for previous Democratic presidents were among those who should be fired.