malloc+memset(0) to calloc

Hi, cleaned up.

 realloc thing was for the possibility of leak if the realloc fails and the copy is lost forever, so i leaved this out for now.

 Both av_malloc or av_mallocz in mem.c in ffmpeg was last changed in 2002. Libressl devs made a good case on practices of malloc calloc memset for both security and performance.