For #26314 - added migration of tank.bat/tank binaries to core upgrader

- This is essentially the same code from previous migrations but with an extra check to ensure that the tank.bat/tank scripts are only updated for pipeline configs that share the same core.
- Also updated script to use sgtk/Toolkit instead of tank where appropriate (You can ignore these changes - sorry for the pollution!)
just for safety, maybe we should try to chmod(0777) before we do the copy? In case users have been changing stuff themselves. Is the umask globally set already? If not, it may be worth doing that too.