cmake: Fix download handling

Sometimes cmake's download handling gets stuck on various platforms.
This abstracts downloading into its own module and employs either wget
or powershell to perform the actual download.

Change-Id: I1dd01b2b8559455549d03d088d13e8b509d89550
Reviewed-on: http://review.couchbase.org/38681
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>