asna/tsan/msan: fix wait() interceptors to allow NULL arguments