remove duplicate key from getmulti

In original code ,we abandon receiveGetResponse(key).It cause next command on this client will get wrong header.So I just remove the duplicate key from key array.
mv dedup code and make responses outside of the critical section (i.e., before the lock).  Also, refactor the dedup code into a function, and dedup keys for delete as well.