1. It is a mouse droid. Mouse droids are multi purpose droids that can be programed with one skill. They are often used for repair or cleanup, but can serve a variety of uses.
2. The creature in the trash compactor was a Dianoga. They are scavenger's that often migrate to trash bins in thier microscopic larval form. They tend to feed of organic matter in the trash a refuse area. This one must have gotten aboard sometime during the Death Stars construction, and grown from there. There are many reasons to compact the waste. Maybe they were reducing the size of the debris they put in space, and maybe they had a recyling programs as you suggested.
3. Space slugs live in space. They make thier homes in the astroids where they feed off minerals in the astroid, as well as space engery fields and mynocks.
4. Protocol dropids were most likely designed like that to keep costs down, so that the avarge buyer could afford one. They should not be doing anything that would require perfect freedom of movment, C3PO was always doing more than he should.
5. At-Ats were not designed with effeciency in mind. They were as much a weapon of terror as they were a weapon of war. They were designed to specifically look like old beasts of war, in order to frighten the enemy as well as destroy them. They destruction while they were down had nothing to do with them beign tripped. Their flexible necks are weak and vulnerable to weapons fire, it is just easier to hit when the AT-AT is down.
6. The ewoks were mainly lucky combined with the fact that the Empire never considered them a threat, they underestimated what kind of damage a primitive society can cause.