cuda: fix wrong decoding surfaces count.

parser's max surface count can't be larger than decoder's surfaces.
otherwise, the index from parser passed to decoder may be > decoder's
surface count then got CUVID_INVALID_VALUE.
surfaces count can not be too large, otherwise may out of memory
TODO:
check surface in use and wait if needed.
update parser's max surfaces if decoder recreated(frame format, size
change)