Don't leak filename_fs on errors.
Removed some unnecessary null-checks for calls to g_free and g_strfreev
Minor tidying up
Fixed leak of filename string.
Removed some commented-out code.
Removed some unnecessary casts.
Removed unused hexchat_filename_*_utf8 macros.
Fix various unsafe string handling in fkeys

Also removes the 2048 input byte limit
And fixes utf8 completion chars in some cases
Use gboolean for bools
Respect servers chantypes and nickprefixes when tab completing

Closes #441
Fix tab completing with no completion char
Fix typo
Fix unused warning
Fix unsafe string handling in configs

Also fixes 2 leaks
Fix chanopts not saving if /quit before exit

This is the C fix, unfortunately a proper fix, e.g.
 removing the dependency on session_name all together is a much vaster
 refactor outside the scope of this bugfix.

Closes #1111
Create configuration option to control middle click tab close.

Some might argue that this shouldn't be able to be configured as it is "common" behaviour
in other programs such as web browsers, but for me it is an annoyance because for 15
years this has not been the behaviour of X-Chat.
Quite simply, this creates a configuration option for 537fb856, as unobtrusively as
possible, under the channel switcher preferences tab.

Closes #1232
Fix some warnings in xsys

- Remove unused code
- Fix leak
Fix some leaks
Fix possible overflow when using /menu
sysinfo: Simplify remove_leading_whitespace()

Also fixes a possible overflow