A woman who spat at and kicked a police officer in Swindon has been sentenced.