Use a much better method for adding bitstream restrictions to the SPS. Fix a violation in H.264 spec after adding bitstream restrictions. Credit to irtimmer for the changes.