Lots of WinRT bridging code added.

Sadly there's still a fair bit to go, though at least now the more
fiddly bits (like plugins) are done & dusted.