avcenc: Add bitstream overflow check during emulation prevention am: 10910bf910 am: 51373e847b am: 08e74b410b am: 4e4dc6be01

Original change: https://googleplex-android-review.googlesource.com/c/platform/external/libavc/+/13932334

Change-Id: I5c98ae2cae9b4e1d5577f961247ba1fc06f97b58