MB-11559: Move stats-related functionaltiy to stats.{c,h}

... in preparation for files other than memcached.c calling stats functions.

Change-Id: I27e7a24eaf778af5cb11fbd71d1f0dd42b209fa7
Reviewed-on: http://review.couchbase.org/38967
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>