Most of the time the reason behind the kneading action with kitties (never heard of it for dogs, lol!) is because they were weaned away from their mother too early. This is what I've heard and I've personally seen a bit of evidence to support it, but it could be totally false.

Just to say- I really don't want to sound mean, but.. why isn't your kitty fixed? Did you want to raise kittens? It's totally okay if you do, but when boy kitties get older and aren't fixed they spray. A lot. :/