Fix multi-track recordings going out of alignment on long recordings

Previously the wall clock was used to align speakers. As this didn't
allow for reliable detection of silence between outputs a heuristic
was used which only started adding silence after 100ms.

This patch makes the mixer keep track of the absolute number of samples
requested from it. This number is then forwarded to the recorder with
each addBuffer to allow for sample precise alignment.

To get the absolute sample number when starting the recording a thread-safe
way to retrieve this counter from the outside was added using a new
mixer lock.
Fix recorder crash due to use after free on user object.

The recorder used a ClientUser object pointer attached to the RecordBuffer
to be able to access a users session id and username . If the user joined
a server, made a noise and immediately left the server before the
RecordBuffer from the noise was processed the referenced ClientUser was
already deleted which crashed the client.

This fix retools RecordInfo and RecordBuffer to carry the information
previously needed from the ClientUser so that inside of the recorder
thread no dependencies to the ClientUser exist.
Refactoring of VoiceRecord.h/cpp according to new coding guidelines.
Modify VoiceRecorder to be able to properly abort a recording.

Previously huge amounts of silence were written in one step.
For long multi-channel recordings a joining user might cause
hours of silence to be written to disk before the user regained
the ability to abort a recording.

Now the recorder will only write up to 1s of silence per iteration.
If more silence has to be written the corresponding RecordBuffer
is re-queued for a later iteration enabling a timely abort.

This channel also includes some small refactoring for increasing
the readability of the recorder and to remove some warnings.
Fix "Inverted samples in WAV recording when clipping" #971

When libsndfile is handed float data but asked to write it in a
non-float format by default wrapping behavior occurs. This lead to
very audible artifacts in recordings for those file types.

This fix enables hard-clipping behavior in libsndfile for non-float
file formats by setting the SFC_SET_CLIPPING property to true.
Fix assumptions in alignment fix by reintroducing silence heuristic.

Previous fix assumed mix was called exactly once for every sample
output on the audio device including silence. This is not true
for all audio backends and hence can't be relied upon in the
recorder.

This fix removes the absolute sample counting and replaces it by
a sample count estimation done in a central place before adding
the buffers from mixing to make sure alignment isn't affected.

This solution accepts some drift between tracks of up to 100ms
due to silence insertion however it prevents larger absolute
drift over longer time. It is compatible with all audio backends.
Prevent adding to VoiceRecorder buffer after recording was stopped.