When I first got Speckles in 1997 she had 3 bouts of UTI within a year and a half and it was awful. We experimented many times with different meds then finally came across Baytril. During her last bout, it took about 10 days before she responded and the vet took a urine sample for a sensitivity test to see what medication would work the best. Knock on wood, she's been fine for about 2 years now.
About the foaming, don't worry. When cats taste something bad like a pill, they automatically foam at the mouth. Max, my Persian, has done it several times when I've had to medicate him. It's really quite funny looking on him.

It's going to be a long couple of days before you get the results of the tests. In the meantime, I agree with everyone that you should seek out another opinion. Please keep us updated.