I've been dryhopping in the primary a week before I keg. In fact, I'm kegging a beer today that's been dryhopping since last Thursday. I'm pretty adept with siphon, and I have an ounce of leaf hops and a 1/2 ounce of pellets just chucked right in there!
I just rack, starting in the middle below the floating leaf hops and above the trub/dissolved pellet hops. I haven't had good luck with trying to use a bag over the racking cane, as it always clogs, but I have no problems racking.
You can dryhop in the keg if you want- just use a sanitized hop bag or one of those "tea ball" strainers. The largest tea strainer can be filled with about 1/2 ounce of leaf hops. If you're using pellets in the keg, you need a fine mesh hops bag, so you don't clog up your diptube.
Broken Leg Brewery
Giving beer a leg to stand on since 2006