print_download_id(): fixed memory leak.

Also simplified the access chain: the shell runs in the core, hence there
is no need to pass via the UI->core bridge interface: we can call the core
routines directly.
Fixed memory leak in HTML parsing on the error path.

Also renamed internal routines with an "html_" prefix prepended, to make them
more unique.
node_slow_timer(): fixed memory leak on the firewall-status-check path.
stacktrace_init(): fixed small memory leak.
get_g2_results_record(): fixed small leak on error path with "ALT" sub-packets.
w_concat_strings(): make sure we avoid any chance of overflowing size_t.
search_results_log(): make sure we always behave correctly when n == NULL.
Make sure the index used to address slice[] is within boundaries.
compat_pagesize_intern(): ensure we never return -1, use 4K as fallback.
clock_adjust(): make it more robust by asserting our assumptions.
Made GGEP length-encoding constants unsigned to avoid sign-extension problems.