Add a av_fast_malloc function and replace several uses of av_fast_realloc,