livehttp: refactor segment change and writing into own functions
livehttp: refactor Close

Use Write-function and refactored functions to check that in flushing
we don't write too long last segment but split it in multiple segments
if needed. Fixes #9383
contrib: add custom build for x262
x262: add new x262 MPEG-2 encoding module based on x262

This relies contrib version of x262 that gives x262.h and all. Otherwise
it seems to be pretty hard to have x264/x26410b/x262 in the same time.