WIP: Write PDBs to stream instead of file

This enables writing the PDB to a memory-stream when shimming the
file-system. Code mostly converted from Roslyn
(http://source.roslyn.codeplex.com/#Microsoft.CodeAnalysis/InternalUtilities/ComStreamWrapper.cs,5dbd4388f94fa102)
I believe it works on 64-bit (at least on my machine and AppVeyor).. Still, it's the right function to use for DLL references in the test suite - if necessary please adjust it if it doesn't work for you, thanks.