Let us say I got a time critical emergency right after the liftoff (like a fire, complete power loss) and I need do a return-to-runway and re-land maneuver. Which option is better, a 180-degree turn for a tailwind landing or a 360-degree turn for a headwind landing?
Neither! The right course of action with engine failure or emergency after take off is land straight ahead within 30 degrees of straight.
If there is enough runway ahead of you, land on that. That is the first (and best) option.
180 and land is possible, I've seen it done a couple of times. If it goes badly, it goes REALLY badly. The likelihood of being able to glide an entire circuit (traffic) pattern is almost non-existent unless you're quite far down the downwind leg - you only have to practice glide approaches from the pattern to realise that.
The only time I would even attempt it if I had a partial loss of power and was able to maintain straight and level flight, then I might limp round the pattern and land as usual.
But I re-iterate, any significant emergency below circuit height, with significant loss of power or significant need to get back on the ground ASAP almost requires an emergency landing straight ahead.
Some aviators have performed tests in various aircraft - see the video below, in short the results show that a 180 works for some aircraft, under some circumstances with some pilots. A 180 back to the runway landing in the opposite direction is more than 180° though.
The bottom line is however, it is better to land within 30° either side straight ahead.
And may I suggest, with modern technology, especially if your airfield is surrounded by urban sprawl, to study the after takeoff areas using your favorite satellite image app (mine is SASPlanet) and have predetermined areas in in your mind in case such an emergency arises.
In glider training I was told to prepare for line break, ie the line from the tow plane would break (or other mishaps). Up to a certain height, straight ahead within a limited arc. Select and plan for the fields to land on (different due to season and type of growth). Up to next height, 180 degrees. Above that height a full landing pattern. Of course, the actual height would be different depending on type of plane and other circumstances.
The main point was (is): prepare for problems and create plans -- once there follow the plan and Aviate, Navigate, Communicate in that order.
When training for powered flight from a municipal airport, my teacher did show alternative emergancy landing sites causing as little problem as possible for me and innocent bystanders. Better to aim for a small lake than a large office building.