build: Factor common build rules into common.make

Reduce duplication in the Makefiles, and eliminate the need to copy
compiler warning flags everywhere.
build: Use CFLAGS and LDFLAGS

It is standard for build systems to pay attention to CFLAGS and LDFLAGS,
so the user can customise the build process with custom compiler and
linker flags set in their environment.
build: Update .gitignore
config: Remove an unnecessary destructor call

If col_bind_iterator() fails, the iterator will be NULL.
config: Use the correct destructor for iterators

The iterators must be destroyed using col_unbind_iterator(), not plain
free(), or their internal data will not be freed. See the documentation
for libcollection.
config: Use the correct destructor for calloc()-allocated memory

Memory allocated with calloc() should be freed using the normal system
free() function. g_free() should only be used for memory allocated using
GLib’s allocation functions.
sdp: Clear a global variable on deinit

The SDP data has already been freed, but we shouldn’t leave a dangling
global pointer to it, since that will never go out of scope.
janus_streaming: Memory leak fixes in janus_streaming

Various fixes for memory leaks just by initialising and destroying the
plugin, and not actually using it.
janus_videoroom: Memory leak fixes in janus_videoroom

Various fixes for memory leaks just by initialising and destroying the
plugin, and not actually using it.
build: Add a Valgrind suppressions file

This can be used with --suppressions=janus.supp with Valgrind to
suppress common GLib initialisation leaks, plus a couple of
Janus-specific leaks.
janus: dlclose() all loaded plugins on shutdown

This fixes a memory leak. However, we cannot do this unconditionally,
because calling dlclose() unloads the debug symbols needed by gdb and
valgrind (see: https://bugs.kde.org/show_bug.cgi?id=79362). As a
compromise, call dlclose() when log_level is low, which is likely in a
production environment. When debugging, do not call dlclose(). A
suppression for the leak already exists in janus.supp.
janus: const-correctness fixes
janus: Mark janus_process_error() as gnu_printf

This allows the compiler to check the format placeholders.
janus: Don’t pass const strings to variables which are later freed
janus: Don’t call g_type_init() for GLib ≥ 2.36.0

It is no longer needed.
janus: Fix various signed/unsigned integer comparisons

This tidies up a few compiler warnings.
plugins: Fix various no-op if-statements

The body of these single-line if-statements was not being executed due
to a stray semicolon being in the way. This should fix a few memory
leaks.
utils: Simplify janus_string_replace() API

Remove the modified parameter, and instead automatically free() the
message string if it needs reallocating. This is safe, as the caller
should be using free() to free it anyway (rather than any other
memory-free function), since we return values explicitly using the libc
memory allocation functions.
janus_videoroom: Replace string_replace() with janus_string_replace()

No point in having two identical functions.
plugins: #define packet templates to allow format placeholder checking

The compiler is not clever enough to perform format placeholder checking
on static const strings, so use #defined string constants instead.