CBQE-983: optimizations in windwows remote_util

Change-Id: Ia982e67fbbbc96e39cf3049479ed3f006ae3be2d
Reviewed-on: http://review.couchbase.org/24681
Reviewed-by: Andrei Baranouski <andrei.baranouski@gmail.com>
Tested-by: Andrei Baranouski <andrei.baranouski@gmail.com>