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)
Right, would be good to fix that one