add system stats library

Change-Id: I5b6b1776bb7492ad43ac5e68740cc4ef015c845f
Reviewed-on: http://review.couchbase.org/24223
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>
Tested-by: buildbot <build@couchbase.com>