A more coherent CSecurityManager::generateRandomBytes

See [PR 2604 discussion](https://github.com/yiisoft/yii/pull/2604#issuecomment-20575409) & issue #2053.