Clear old key
Update gc for key and value
Update test case
Merge pull request #2093 from ke-yu/fix_zombie_arraykey

Increase reference count for new key only if it is really a new key