ci: use templates for VSTS builds Our build YAML is becoming unweildly and full of copy-pasta. Simplify with templates. (cherry picked from commit 6b2d8f09bc9e5bdf74f98b7470ebc39436be600f)