avutil/mem: add av_warn_unused_result

This adds av_warn_unused_result to functions whose return codes need to
be checked.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
