Perceived relation between odors and a negative event determines learning of symptoms in response to chemicals