One obvious tie-in from TDW is that, since the bifrost gets rebuilt, travel to Midgard will be less costly (in terms of dark energy conjurations). But to tie Thor directly to Ultron, one possibility would be if Ultron utilizes Asguardian-based tech, such as SHIELD's Destroyer-based guns.
As for how TWS relates to this, I think that the tenuous relationships between SHIELD, the government, and the Avengers will come crashing down in TWS. I'm not exactly sure what the resulting configuration will look like, but I think it will create the type of environment in which Ultron can realistically be created by one of these parties.
Come to think of it... "Phase 2 is SHIELD used the Cube to make weapons". Ultron, is that you? After all, "The world is filling up with people that can't be matched, that can't be controlled."