Add better async test support. Fixes #969.

This probably needs a decent read-through @stucox -- but I think it's what you want. I haven't quite been bothered to rewrite the tests that this fails. They are generally expecting false values for async tests, and now getting explicit `undefined`s. But as far as I can tell, that's desired functionality now. Went through and converted all async tests to the new format.