workq_kernreturn: Extract initial flags and fix x86_64 assembly arguments
We need to initialize the flags in case we terminate as soon as we're created (because `_pthread_wqthread` requires valid flags).
This also fixes the x86_64 assembly to ensure that the 6th argument is actually passed (for some reason, the old code was causing the 6th argument to be a copy of the 5th). We don't need to specifically use `rbx`, so just use `r` and let the compiler decide what to use.