SPARK-4628: Put all external projects behind a build flag

This is important since we don't want breaks in the dependency
graphs of external projects to break the default Spark build.
Should this be `external-projects`?