I’m not quite sure how the tunnel works, but if it is a kind of a mail proxy, then the username in the account settings has to be set like this:
NAME#127.0.0.1
It will make avast connect to the address 127.0.0.1, port 110 where the tunnel listens

For the account without the tunnel, it has to be
NAME#POPSERVER

Some info here: http://www.avast.com/forum/index.php?board=2;action=display;threadid=1602;start=0