Improve/standardize some malloc/realloc return val checks.