misc: added functions asprintf and avsprintf

These functions act like sprintf and vsprintf, except they allocate
their arguments instead of requiring a pre-allocated one.

Signed-off-by: Celelibi <celelibi@gmail.com>