Code Cleanup and tiled MUC icons

Refactored some of the contact pictures related code, added gmail-style tiled MUC icons. The code is a bit messy, but it's late now and I need to sleep.