localalloc: Declare the cleanup functions inline in the header

This enables gcc with -Wuninitialized to warn if the cleanup function is used
on an uninitialised variable.