Fixes to allow "make dist" to generate 100% offline-buildable, assembly-free tarballs

This is a small set of minimal patches so "make dist" stops including any assemblies (i.e. only source code), and "make" in the resultant tarball can be done without an Internet connection.

The main logic used for this is xbuild conditionals which only do things like run NuGet if $(SolutionDir)\..\.git exists (i.e. a check for whether this build is running from git)