Reimplement destroy_proctitle().

No leaks found by valgrind after this.

Though tsan will probably still get cranky if different thread
does the freeing than the one that did the allocating.
Use size_t for lengths.
No need for extern here.
Don't close syslog until very last moment.

Otherwise there's a race between our logging still
trying to use it and it being gone. (Found by tsanized
executable hanging at shutdown.)
Cleanup the config file parsing.

Also avoids a msan hit on the line buffer (accessing uninit memory).