Wow! That sounds like a lot of changes for a 2 year old. He must be very scared and overwhelmed and confused. Think about how stressful this is for you and then triple that. That's probably what he's feeling.
Right now, he needs to feel your love. He needs positive attention. Try to give him lots of positive attention. Catch him being good. "Thank you so much for saying please. That makes Mommy feel so good." "I'm so happy you sitting at the table like a big boy. Isn't it nice when we eat together?" The more positive attention you can give him, the more he'll seek positive attention form you.
The behavior you're describing is complely normal for his age. He's probably just learning how to really talk and communicate with you. And he's learning how to identify his emotions and how to handle them. When he starts behaving like this take a deep breath. Get down on his level and look him in the eye. "I know you're very frustrated/angry/sad. It's no fun when you can't have a cookie. We're going to eat some yummy pasta, and then you can have a cookie."
Make sure you help him to see that you understand. If he doesn't respond, take another deep breath. Then look him in the eye and say, "I'm sorry, but Mommy can't understand what you're saying unless you talk to me like a big boy." Reinforce this over and over again so that you are sure he knows what you are asking of him. Make that the goal. Rather than telling him what not to do (don't yell, now whining, etc.), help him to understand what you would like him to do.
There will be many times when he just cannot resist the bad behavior. That's when you have to make sure you have his attention, make it clear what you expect from him and then ignore the bad behavior. If it goes on for a couple of minutes, which is an eternity to him, say something like, "I sure wish Michael would calm down and talk to me like a big boy. I would really like to show him these yummy apples."
I'm not saying there isn't a place for time outs or any type of punishment. And I'm definitely not saying I don't yell back occasionally ... ok, more often than I'd like to admit. But I do know that those are definitely not the times that achieved the desired results.
My 5 year old was and sometimes still is a whiner. He wasn't as bad with temper tantrums, at least not the kicking and screaming kind, but boy can he whine. We would get so frustrated and sometimes get so mad at him. But the times that we calmly asked him to talk like a big boy and showed him that we were willing to listen were the times that he responded the best.
It really does work! Hang in there. I know it must be even tougher for you, given your current circumstances. Just keep loving him and giving him lots of hugs. You'll both be so much happier for it.