Reboot your in safe boot mode:
1-Shut down your Mac and wait 10 seconds.
2-Press the power button.
3-Immediately after you hear the startup tone, hold down the Shift key.
4-You should press the Shift key as soon as possible after you hear the startup tone, but not before.
5-Release the Shift key when you see the gray Apple logo and progress indicator (spinning gear).
This method disables loading most startup items and should allow your computer to boot. Then uninstall avast and reinstall with the current version from the website
To uninstall avast completely, the only "easy" way is via the uninstall menu entry in avast. which requires avast to be running, in safe mode avast isn't loaded, so you don't have the uninstall option.
Now, I'm sure there's a command line way to run this uninstallation and remove avast completely (not just the app), or at least a description of what should be deleted by hand, I just can't find any up to date reference on that.