Prototyped a dynamic library facility interface
Fixed up formatting, and nits
Fix windows code for dll
auto merge of #7027 : sstewartgallus/rust/dynamic_lib, r=graydon

I would appreciate if someone could help out with the Windows code on this pull request. I tried to test it using WINE but I couldn't figure out a way to set that up.