[RFC] Last big PR on removal of redundant OOM error handling

#488 took some time. Please review. Ping @oni-link (really good at finding my mistakes on these PRs), @aktau, @elmart...
Function attribute is wrong, this function does not return anything. Did you mean to use `FUNC_ATTR_NONNULL_ALL`?