Expanded the ProfileList class so it worked more like a recipe. This
helps to get rid of a lot of special cases and simplifies the code. It
also makes it possible to do things like group block.
Moved the common_avatar_* functions to the Avatar class. Typically
either as methods on the object or as static methods. Replaced all the
uses of the functions in other modules.