nih_local-ify some stack usage

In particular recursive functions shouldn't use huge stack vars.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>