[Encoder] add validation of slice parameters instead of assert

add validation of slice parameters instead of assert, so the setting of encoder has a better behavior

reviewed at: https://rbcommons.com/s/OpenH264/r/876/