[Encoder] add validation of slice parameters instead of assert

Reviewed at: https://rbcommons.com/s/OpenH264/r/876/