Computes the mean of times on the 0-24 h clock using the unit-circle
method: convert each time to a unit-vector angle, average the sin and
cos components, and back-project via atan2. This correctly handles
midnight wrap (e.g. times at 23:30 and 00:30 average to 00:00, not 12:00).
Details
The older threshold approach (shift values >= 12 h by -24 h before averaging) produces badly biased estimates when times straddle noon – critically for sleep offset in late sleepers – and is superseded by this function (Fix 20 in the JRSV pipeline, ICC for sleep offset 0.502 -> 0.897 on N=404).