CBD-285: refactoring XDCR unit tests
CBD-285: refactoring XDCR unit tests

This change-set extracts redundant memcached binary protocol building
code in multiple XDCR unit tests and put them in helper functions.
Future unit tests can call these helper functions directly to send
operation set_with_meta/add_with_meta/delete_with_meta to ep engine
without building the packet from  memcached bianry protocol.

Change-Id: Ia9948e7e70235b67b249e27fa006fc13460a6a17
Reviewed-on: http://review.couchbase.org/16394
Tested-by: Junyi Xie <cec9b1c9f34a8d92cba938f3f3364d5120580782@gmail.com>
Reviewed-by: Junyi Xie <cec9b1c9f34a8d92cba938f3f3364d5120580782@gmail.com>

daverigby/kv_engine,hisundar/ep-engine,owendCB/ep-engine,abhinavdangeti/ep-engine,membase/ep-engine,owendCB/ep-engine,jimwwalker/ep-engine,sriganes/ep-engine,daverigby/ep-engine,sriganes/ep-engine,sriganes/ep-engine,teligent-ru/ep-engine,abhinavdangeti/ep-engine,teligent-ru/ep-engine,sriganes/ep-engine,owendCB/ep-engine,jimwwalker/ep-engine,daverigby/kv_engine,daverigby/ep-engine,couchbase/ep-engine,abhinavdangeti/ep-engine,daverigby/kv_engine,daverigby/ep-engine,couchbase/ep-engine,membase/ep-engine,couchbase/ep-engine,teligent-ru/ep-engine,daverigby/ep-engine,abhinavdangeti/ep-engine,jimwwalker/ep-engine,hisundar/ep-engine,hisundar/ep-engine,abhinavdangeti/ep-engine,owendCB/ep-engine,teligent-ru/ep-engine,hisundar/ep-engine,membase/ep-engine,daverigby/kv_engine,jimwwalker/ep-engine,membase/ep-engine,couchbase/ep-engine