always peek request from cmd_log and pass to handler

* simplifies key extraction
* helps to purge buffers properly if lcb_connect called from the
  callback

Change-Id: I094e2888d9973fce83a4620fec34efd629b58794
Purge pending operation on reconnecting

Change-Id: I925c9483f0ed4f692530c7330453dfce381b2de4