Put avatar cache inside user-emacs-directory

Avoid polluting the user's home directory.
Move history files into user-emacs-directory; default to per-contact history

Avoid breaking existing installations: if the global history file
already exists, use it; if the file/directory exists at the old
location, keep using it.