Fix build errors for WIN32

* Use time() to init srand()

getpid() isn't available on msvc, and istead of
making a wrapper we can just as well use time()

Use C89 style

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