h265parse: modify the way to check the validity of slice data.
Some h265 bitstreams may contain separate SPS and PPS(PPS is not next to SPS), when processing the data between the SPS and the PPS, the h265 parser state may be GST_H265_PARSE_STATE_GOT_SPS, but not GST_H265_PARSE_STATE_VALID_PICTURE_HEADERS, then the data will be dropped. But the data also reference valid SPS and PPS, they are valid and should not be dropped. So just by checking the state to determine whether the data is valid or not may be incorrect, checking whether the data reference valid SPS and PPS may be a better way.