... if it was man who domesticated the cat or if it was the cat who had domesticated man.
Here's one definition of "domestication" I found...
"I have defined a domesticated animal as one that has been bred in captivity, for purposes of subsistence or profit, in a human community that maintains complete mastery over its breeding, organisation of territory, and food supply. The exception, of course, is the cat which walks by itself."
~ Juliet Clutton Brock (The Unnatural World -- Behavioral aspects of humans and animals in the process of domestication)