warnings interface was only being linked to qtox_static, so were not being
applied to e.g. util. Link it to each library as well as qtox_static so that
they all inherit all the warnings.
* Move free functions to the anonymous namespace
* Additionally move static free functions to the anonymous namespace
* Move functions that must be accessed externally to static class functions
Avoid shadowing variables:
* Rename variables to something better if possible
* If not, postfix shadowing arguments with _. Favour leaving member
variables without postfixes.
* Rename variables prefixed with _ to avoid library function collisions
* Avoid double underscore anywhere in names
* Make definition and declaration argument names match where seen
* Favour using class variable over argument variable, where equivalent
* Remove explicit this-> where equivalent
Define at least one virtual method in polymorphic class cpp files to
improve link efficiency. Do so by defining a defaulted destructor or
another overridden virtual method in the class cpp file.
Also add explicitly defaulted copy/move constructors and assignment
operators to follow the rule of five and to avoid compiler suppression
of these functions due to the addition of a user-provided destructor.
Where neccessary, create new cpp files and add them to CMakeLists and
Testing.cmake. Set the -Wweak-vtables by default when compiling with
clang to issue warnings for new classes that do not comply with this
pattern.
See http://llvm.org/docs/CodingStandards.html#provide-a-virtual-method-anchor-for-classes-in-headers.
Fixes#6036.