fixed #1644: Passing NULL parameter to ccdictionary_to_jsval will cause crash, and improving performance for ccarray_to_jsval.