Clean and simplify vendor.sh while making it easier to maintain as well

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Merge pull request #3625 from tianon/cleanup-vendor-sh

Clean and simplify vendor.sh while making it easier to maintain as well