Use pkg-config to check for libde265.
We need at least version 0.6.
"DE265_ERROR_WAITING_FOR_INPUT_DATA" is always available with libde265 >= 0.6.
Use new API now that we depend on libde265 >= 0.6.
Release buffer in error cases.
Map buffer readonly.
No longer need "WRITE_BE32".
Start more threads than available cores.
Some threads might get blocked while waiting for dependant data, starting more increases decoding speed by about 10%.