native: Protect against spurious wakeups on cvars

This is a very real problem with cvars on normal systems, and all of channels
will not work if spurious wakeups are accepted. This problem is just solved with
a synchronized flag (accessed in the cvar's lock) to see whether a signal()
actually happened or whether it's spurious.
rustuv: Fix a use-after-free on destruction

The uv loop was being destroyed before the async handle was being destroyed, so
closing the async handle was causing a use-after-free in the uv loop. This was
fixed by moving destruction of the queue's async handle to an earlier location
and then actually freeing it once the loop has been dropped.
rustuv: Fix a memory leak (documented inside)

This happened because the environment of a procedure was never deallocated.
Various test fixes and rebase conflicts