"what would it take for a dog to develop certain intelligence"?, they have good characteristics, firs they are omnivores, they learn a bit fast and they work in packs.
I have seen a show about dogs and they said that over time with domestication dogs have actually gotten dumber than wolves. Especially in the breeds that don't have to think such as the toy breeds. Its the herding dogs that have to do complex tasks that are the breeds that have retained their wolf-like intelligence. This makes you wonder if we are domesticated ourselves into become dumber than our caveman ancestors.
At any rate dogs are already smart, have a complex social structure, have emotions, can do many tasks. I would say really its the limitation of their skulls. With such strong jaws their brain can only get so big. They would have to develop weaker jaws and a larger skull to become more intelligence.
However since is un-likely due to its benefits. However humans could breed such a trait into a new breed of "smart dog". But is suspect that with the advancement of computers that dogs will be given brain enhancements and could in theory become sapient. Would dogs still be man's best friend or sniff your crotch if they did? Who knows. But its fun to imagine.