hevc: fix the order of fields in hls_nal_unit().

nuh_layer_id precedes nuh_temporal_id_plus1.
hevc: check the value of temporal id

It must be non-negative.
hevc: return an error on invalid NAL units.