Move get_avc_nalsize() and find_start_code() to h264.h

This allows sharing them with the h264 parser

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/h264: simplify find_start_code()

this also uses avpriv_find_start_code(), though no speed change is expected as
the area searched is generally small

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/h264_parser: rewrite the parse_nal_units() loop logic based on h264.c

Fixes Ticket4011

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>