Add deduplication of log messages

Change-Id: Ic2a5eea193b312aa13eac78e9b6e70ab79bcfc46
Reviewed-on: http://review.couchbase.org/40105
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>