Fixed Win32 issues with Threading and Secure Random Number generation

- The map that associates thread ids and handles under Windows was previously
  declared as a file-local variable in Platform.cpp but could actually be
  referenced before it was initialised. The map is now accessed through a
  file-local function, that has the map as a static variable. This ensures
  that the map is valid before it can be accessed
- It looks like the RSA keyset may not be initially created on all machines.
  If the initial call to CryptAcquireContext fails, it is now called a second
  time with the CRYPT_NEWKEYSET flag.