make function private
remove dependency on decoder_context when reading VPS
default argument when there is no user_data
fix writing of VPS header
add 'hdrcopy' program for testing header writing