Prevent creation of scoped locks without a variable
Prevent creation of scoped locks without a variable

It is incorrect to create a scoped lock
({Lock,MultiLock,ReaderLock,WriterLock}Holder) without a variable -
the lock is essentially acquired and immediately relased (or maybe
even optimized away by the compiler). In other words LockHolder
classes shouldn't be used as anonymous variables.

Prevent such errors from occuring by defining macros which match the
incorrect usage and trigger a compile-time assert.

Change-Id: Ib615a0844f8f415b3a9fe4b66cc029f9b5a94fe5
Reviewed-on: http://review.couchbase.org/56981
Reviewed-by: Chiyoung Seo <fcffc23db27b19ee4ebba46695ee6b50e09216a2@couchbase.com>
Reviewed-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>
Tested-by: buildbot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>

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