Serious bug fix for Apple CC branch

_Note_: __Only Apple CC branch__ is affected. Other ports are safe.

Fix two serious bugs of Apple CommonCrypto branch:
* IV not randomized when encrypting packets
* Compilation failed due to some warnings