golomb: Add a get_se_golomb_long

Useful in libavformat mostly.

(cherry picked from commit 5eacbb53289570834f9a1acb15fd406ea224eef6)
hevc: Use get_se_golomb_long

Do not use inline functions that refer to tables present in other
libraries.

(cherry picked from commit ee17be3fdd37f63f4b77676820e387858908b0f4)
configure: Use the right pkgconf file for openjpeg

The current release of version 1 uses libopenjpeg1.

(cherry picked from commit 4a8562394b685e83ae4a38a93eef43625755a231)
lavf: simplify ff_hevc_annexb2mp4_buf

Use ff_hevc_annexb2mp4 instead of duplicating
its functionality, and update the documentation
to match the new behavior.

(cherry picked from commit 34bbc81de8a49fbddb92b76dc733f40890480b2b)
lavf: always use av_free

Signed-off-by: Tim Walker <tdskywalker@gmail.com>
(cherry picked from commit 77e9123fe5d64b0960158de6e1713d3c6c7878a7)