avcodec/exr: read layers

EXR files have, like tiffs, multiple channels and layers.  I have a
patch for exr.c that allows you to select the layer you want to process
thru a -layer flag.  It is not bulletproof but works for all layers that
have 3 channels in them (normals, motion vectors, etc).
The calling convention for ffmpeg is:

ffmpeg -layer Diffuse -i myexr.%d.exr test.mov

Here's an exr image with multiple layers:

http://www.datafilehost.com/d/e45d9a1c

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>