Make it possible to unit test static functions

In order to be able to test static functions, use the `STATIC` macro
instead of `static`. This way the static will be removed when the file
is compiled for the testapp.

Change-Id: I6175e24c07494bbed0e8456ac857b4d91f5b0949
Reviewed-on: http://review.couchbase.org/39635
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Sarath Lakshman <sarath@couchbase.com>