This commit fixes up the SetDialer method to accept a udp.DialFunc
instead of just a regular *net.Dialer, which is more flexible in that
the user can now control the UDP packet frequency properly.
This commit refactors a lot of voice's internals to be more stable and
handle more edge cases from Discord's voice servers. It should result in
an overall more stable voice connection.
A few helper functions have been added into voice.Session. Some fields
will have been broken and changed to accomodate for the refactor, as
well.
Below are some commits that have been squashed in:
voice: Fix Speaking() panic on closed
voice: StopSpeaking should not error out
The rationale is added as a comment into the Speaking() method.
voice: Add TestKickedOut
voice: Fix region change disconnecting