* due to server bugs, some offline buddies are still notified on publication,
causing error reply, that pep accepts as event. check message type/presence of error tag.
* check input/output for validity, where applicable
* extract common code into one place
* add avatar
* pep_avatar, avatar_cache, avatar, aavatar (separate)
* in
* !avatar-metadata-in @ pep_avatar
* symbol-resolved request @ avatar_cache
* !avatar-data-in @ pep_avatar
* !avatar-in (file) @ avatar_cache
* print, printaa @ avatar, aavatar
* out
* avatar_cache calculates hash and saves hash to cache(, links jid to hash?)
* avatar_cache !avatar-data-out
* pep_avatar sends data
* pep_avatar reports error/notify of success (does static handler have node info?)
* avatar_cache gets file from cache, calculates metadata, !avatar-metadata-out
* pep_avatar sends metadata
* pep_avatar reports error/(notify of success?)
* avatar_cache (links jid to hash?)
* handle url avatars (curl)
* report absence of avatar