What do K.K. Slider and Tom Nook do when they visit?
I can speak for both Tom and KK.
They do pretty much nothing at all and they dont require any "woo-ing" nor do they take up space in your camp.
The one catch to having both is, there can only be one at a time. I have both of their chairs setup but only one will spawn it at a time and they change everytime you edit your camp or leave to go somewhere else.
KK Slider sits on his little stool and plays guitar which is audible if you are close enough.
Tom Nook sits on his director chair and sleeps the whole time.
You can "talk" to these characters but they'll only offer little one liners unlike the other animals.
KK Slider typically talks about being inspired and groovy while Tom will say something a long the lines of "I could retire here"
I can only vouch for K.K., since I have yet to save up enough tickets for nook, but I'll answer all I can.
Do they visit and stay like other neighbours, taking up one of the active "visiting neighbour" slots?
No, they seem to be associated with the item only. They don't function like other neighbours and don't take up any neighbour slots.
Do I have to woo them with favours/requests, and do they also have "friendship levels" like the other neighbours?
No, as mentioned, they don't function as other neighbours. As far as I'm aware you can only initiate a conversation with them, but cannot fulfil any requests or favours. In turn, this means they don't have "friendship levels" either.
Does either special character affect gameplay or are they simply cosmetic bonuses?
As far as I'm aware, they are only cosmetic. K.K. slider appears to play some music at your camp, and that's about it. Treat them as decorative items rather than neighbours.