generics: throw instead of abort() by default

Also fix broken code that was being hidden by the THROW macro.
Fixes https://github.com/dyfet/ucommon/issues/4