fix crash issue in CCArray::initWithObjects()

The `initWithObjects()` function always crashes.

    Array *arr = new Array();
    arr->initWithObjects(foo, bar, nullptr);

In the implementation of `initWithObjects()`, `data` is set to `nullptr` by `ccArrayFree()`, but never gets allocated by `ccArrayNew()`. So the following calls to `addObject()` will crash due to the null pointer.