#27476 Localize command now tries to switch more intelligently.

Previously, the `tank localize` command would first copy and set up the core api for a pipeline configuration and once that was done it would copy all engines, apps and frameworks across. This caused a potentially extended period of time where the pipeline configuration was in half-completed state and wasn't operational. This was causing issues in production.

This fix moves things around so that the apps and engines are copied first, and then the API is copied. While not a perfect fix, this should hopefully still resolve most issues.
This is a very good point. In the past, it was using a slightly different list in every location where this was used. Let me check if that's still is the case! (we did a bunch of cleanup in 0.15 so maybe now things are more consistent).