Project cleanup and up to date extension stub project

This PR contains fixes which make all the builds work in all configurations. I'm not sure why the debug builds weren't working as I thought I'd done those already. They are done now.

I've also added a new stub project for extensions. This can be used as a copy and paste template for creating new extensions, documentation has been added to the readme which explains how this can be used.