base_update: properly free all structures on error

If any error was detected during thread initialization, the init
function would simply return with an error without properly freeing the
allocated data structures. Fix this so we'll all sleep better at night.
main: properly free structures and close fds on error

Some functions in main simply returned with an error code instead of
properly freeing all allocated structures and closing filehandles first.
This will probably never be detectable, but we'll fix it anyway to sleep
better at night.
universe: properly free all locks in universe_free()

Destroy all rwlocks created in universe_init() in universe_free().
ptrlist: use list_for_each_entry_safe()

Use the more proper and simpler list_for_each_entry_safe() macro in
ptrlist_free(). This simplifies the code somewhat.
remove unused variables

Reduce clutter by removing dead code.
Makefile.am: disallow unused variables

It was easier to allow unused variables during initial coding as it let
the design progress faster. As the code base starts becoming
increasingly complex, leaving this on is a bad idea as it clutters the
code with unnecessary cruft. Disallow unused variables.
cli: disallow empty input

cli_run_cmd() is supposed to return an error for an input string of
length zero or consisting of just whitespace, but this was not properly
done.

The backend stringtree has no difficulty using an empty string as an
index, but it doesn't make any sense to allow it.