fixed #1644: Passing NULL parameter to ccdictionary_to_jsval will cause crash.
Merge pull request #2610 from dumganhar/iss1644-dict2jsval-crash

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