.NET 4.0 support

This PR is an update to #216  and fixes #207.

Support for .NET 4.0 is now added through dedicated project files, rather than using conditionals. Additionally .NET 4.0 tests are built and run in the build scripts.