Reading over all of this i'm surprised that noone has suggested a PARTY LOOT system in where all of the loot is put into one big pile and maintained by 1 person. Then all the gold is distributed equally amongst each other and if anyone wants any of the items that you have distributed they simply buy it from the party loot.
This way if you don't have to give out specific items for a character to make sure he gets it and everyone get's a fair share of the loot and can use it however they want at their convenience. This also has the advantage that any items that you give out as a reward ends up not being wanted by anyone it can just simply be sold for gold then split.
Since the characters have all kept track of the loot given, noone can steal or take anything without anyone else knowing and if the person in charge of the loot steals/loses (etc) without explanation then just simply dock them the outstanding amount from the party loot.
So in the end everyone gets what they want and gets a fair share.
As for someone stealing items from someone else that is called Role Playing and if it's appropriate for his character and backstory then it's his pre-rogative as long as he/she is prepared for any consequences. This can include being confronted by other members of the party and put in jail or the characters deity (etc) smiting the PC and so on.
Also if a thief steals from his party it's before acceptable. Just make sure you do it in secret if you succeed.
In the end if the party fails to divide up the treasure sufficiently since the above system works with majority then let them do as they will and have an encounter that will party wipe them. It's not your fault the PC are dumb, life is unfair and it sucks to be them if they die because they stole, sold, lied (etc) incessently.
E.G An example is if they were attacked in the night and lost in the fight but were able to run away but in their haste they left some supplies behind.
Other more ingenious but less obvious methods is to have some NPC characters depending on the circumstance be a rogue and steal from the thief himself. It's always amusing to find the rogue whose been stealing from someone else to get asked to make a perception check out of nowhere for apparently no reason with everyone else at the start of the new day. The party will just think it's a check for an ambush while in reality it's a check to notice if some of his belongings were stolen.
As for the situation in where one person is looting everyone's corpses ala the Ranger just have an encounter where the party dies just to his greediness or use one of the above suggestions. Avoid the "bolt of lightning falls from the sky dealing 5 dmg to the ranger" sorta thing. You can also suggest to the party they kick out the ranger from their party. Just because you may all be friends in real life doesn't mean it's the same in the game. I enjoy making intricate backstories for my characters who act according to their backstories.
edit: Remember you're the DM and you imagination is your only restriction. In the end people only learn to share when it's proven to be in their favour and more beneficial. After all the reason people steal from party loot (etc) is because of greed and they want to get ahead and become more powerful than everyone else. However if you prove that sharing creates more good than being greedy then it'll all stop and the best way to do this is to create party wipe situations which could've been avoided if the party was appropriately armed. While everyone becomes unhappy make sure they know that if they behaved appropriately then it would've been fine.
Also an amusing situation is if you swallow the greedy person whole and noone else can do anything about it because they lack the proper equipment. Nothing like karma
