Remove `lalloc_clear`

Use `xcalloc` instead. Change some local variables
to avoid casting.