Ringerbuffer: Removal of unnecessary temporary variables.
Ringerbuffer: Removal of unnecessary temporary variables.

The "contents" function of the Ringbuffer object copies
the contents of the Ringbuffer out to a vector.  In the
function the pos and wrapped variables are copied and
then the copies are used during the actually std::copy.

A comment in the code next to the declaration of pos copy
states "snaphot the position, wrapped for consistency".
However copying to the temporary variables is not going
to have the desired effect. Instead a lock must be held.
And in fact this is what the code does.  The Ringbuffer
object is used for the logs, and whenever the contents
function is called the logMutex is held.  It is also
held whenever the logs are updated using addLogEntry.

Therefore the removal of the temporary variables both
removes any doubt about the need to "snapshot" the
pos and wrapped variables, and makes the code cleaner.

Change-Id: I2e4f075015a254b8c569020c921238aa4faf7b1e
Reviewed-on: http://review.couchbase.org/54224
Reviewed-by: Chiyoung Seo <fcffc23db27b19ee4ebba46695ee6b50e09216a2@couchbase.com>
Tested-by: Chiyoung Seo <fcffc23db27b19ee4ebba46695ee6b50e09216a2@couchbase.com>

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