Correctly set the SCM name in build data when set or unset.

When custom SCM name feature is enabled, the custom name is not propagated between builds.  Likewise the custom SCM name is not shown in the build log due to an error in the template language syntax.  This feature is commonly used in conjunction with the MultiSCM plugin.