"A foil to" someone (or something) in this case means the opposite of someone or something.
To "tar" means to tarnish/taint the image of someone to the point of humiliation. It originates from "tar and feathering" where people would be punished by being covered with tar and having feathers put on them. It was punishment meant to humiliate.