As of 61e699a133, stdio clean up
functions are no longer registered in atexit and must be called
manually via __cleanup.
The issue this fixes is some static binaries linked against bionic
cannot output properly when piped or redirected because the buffer
is not flushed before closing.
This is done by pulling in exit.c (and other dependencies) from
netbsd.
Change-Id: I193e54a6d08900f291550029fe75ce76394d9e22