I think the only thing I would have done differently in either of those two situations is give a warning first. So in the first situation where he's mad about the shirt and kicking you. Hold his feet for just a moment and say something like "you're mad! That's okay. But don't kick me, or I will walk away." And then if the kicking continues I would say, "you're so mad! And That's okay, but I don't like being kicked. I'm going in the other room, when you calm down, you can join me."
In the situation with the pencil, "you can use the pencil on a piece of paper. If you try to draw on the wall again, I will take it away and we will do something else." Then when he draws on the wall, "pencils are for paper. But you tried to use it on the wall. So we're going to do something else now." Take the pencil. When/if he starts trying to hit with the pencil, "you may not hit me. If you try to hit me again, I will walk away." When/if he tries to hit again "You are trying to hurt me and I don't want to play any more. I'm going to walk away. When you want to be nice again, you can come join me." Walk away and wait for him to calm down.
This is pretty much how I handle any kind of hurting from DS... and it seems to work. I try to stay calm while it's going on (I don't always succeed at being calm, though) And, It's only taken a few time of me walking away and now he pretty much stops when I give him the warning. I figure it's a natural consequence. If you hurt people, they won't want to play with you any more.
P.S. pp is right being cold won't give someone a cold. I figure that if we're around the house, DS knows how he's most comfortable. If he's cold, he'll ask for a blanket. If he's hot, he'll ask to take clothes off. If we're going out and being naked isn't an option, then I deal with the tantrum. And it's a bummer, but we have missed out on doing things before because of not letting me get him dressed. It's been more of a bummer for me than him in most cases, though (like missing church)... but he's strong little kid and sometimes it really is next to impossible to get clothes on him if he's really fighting it.