lavc: allow the caller to override dimensions in ff_get_buffer()

This will be useful for allocating edges in the encoders.
mpegvideo: allocate edges when encoding.

Allocating edges will be removed from generic code, so the encoder must
handle this explicitly.
lavc: deprecate CODEC_FLAG_EMU_EDGE and avcodec_get_edge_width().