compare_avatars(): mark inline and fix casting
Replaced libavutil's memory management.
Commented out defined but unused functions.
Declare functions either global or local (static) for strict compilers.
Add g++ -pedantic -Wmissing-declarations -Winline flags.