j2kdec: frame multithreading support

This allows comparing the 2 decoders with threads

Based on:commit 2e2d24667a2c5cc7af94cfa7b63bb9ec1c04224b
By: Nicolas Bertrand <nicoinattendu@gmail.com>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>