_ASSERT/QSSERT cleanup

This is big, but straightforward. Note that for some reason my integration of your mac branch is also "included". It is a no-op though.