Everything that goes into libavrdude.a (and potentially also
libavrdude.so later on) must not call exit() by itself.

Fix everything to return a correct status to the next higher
layer (and make sure the status is checked there).

For malloc() failure, provide for a central point of return
in main.c, like avrdude_malloc_failure() that can perform
the exit. Any user of the library is then responsible of
providing their own method for this rare situation.