Goldfish like to chase each other; that is normal. Since goldfish can grow to over a foot long and the fancy ones at least 8 inches long, a 1 gallon tank is not large enough long term for even one goldfish. I suggest getting at least a 20 gallon tank for two goldfish. You can keep them in a 10 gallon tank for a few years but they'll eventually need a larger tank. A 1 gallon tank not only lacks swimming room but the water chemistry will be impossible to control. As the fish grow, the ammonia and nitrite will go up until they're deadly. You should test the water for pH, hardness, ammonia, and nitrite. I would bet the ammonia is already registerable. It will go up while the tank cycles but a 1 gallon tank with goldfish can never complete the cycle; there's simply not enough water or filter material. So, the best thing you can do is get a larger tank.
Stores sell small tanks because they are only interested in selling and not in the well being of animals. It makes me furious to see little 1 or 2 gallon tanks for sale with photos of goldfish on the box. Unsuspecting patrons such as yourself don't know that those tanks aren't fit for even goldfish fry in my mind.
If they are coming out of the vent/anus, then the strings are probably feces that include pockets of gas. This happens due to stress and/or diet issues. You can feed cooked, peeled peas to help with gas. Goldfish poo strings can be pretty long before they break off, sometimes longer than the fish. Fish rarely can have intestinal worms coming out of their vent. White "strings" hanging off the sides of the fish (not out of the vent) are anchor worm.
Adding Stress Coat was good. Goldfish do best with temperatures from 60-75 degrees F but can take as low as 34 degrees F and up into the 90's degrees F short term. Over 80 degrees F really stresses them as the oxygen levels go way down.
Fish don't vomit but will spit out their food. They can do this because they're already full, it tastes bad or stale, or they don't feel good. Spitting out food is pretty common for goldfish and not too worrisome.
Goldfish are no more dirty or poopy than other fish but they have more body mass for the same length that makes it seem so. They are similar to other fish in their waste output if you compare relative to their weight.
Being at the surface can indicate low oxygen, high ammonia, high nitrite, dirty water, stress, illness, etc. It can mean a lot of things.
I am not a vet.
My page on goldfish is at
http://www.fishpondinfo.com/gfish.htmMy fish page with links to water chemistry, tank setup, etc. is at
http://www.fishpondinfo.com/fish.htmI wish I had time to update my old site but I hope you have time to read some of the information I wrote. It's not perfect but should get you started.
Good luck!