MB-11443 Add function for setting binary mode

Adding a new function platform_set_binary_mode to set
the mode to binary. It is mainly useful for windows.

Change-Id: Ie6133546358d48a5953cf5f9c927c2ad9fdd2b0f
Reviewed-on: http://review.couchbase.org/38794
Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>