buildconf.bat: Move DOS variable clean-up code to separate function

Rather than duplicate future variables, during clean-up of both success
and error conditions, use a common function that can be called by both.
1 file changed