Avoid calculating the buffer size each time

Test and log the result (if failed) for GetTime when determining the
buffer queue length
Test the right format when deciding whether to allow bit streaming
Test for bit streamability in SetMediaType too
Address missed calls to GetOutputBuffer and GetPeriod
Treat device period in settings as a default value

So don't set it in InitAudioClient. Some filters (cough LAV Audio) test
multiple formats at a time and choose the one they want. When device
period is set it changes it permanently for the instance. This can cause
problems if a bit streamable format is tested (which lowers latency),
but a PCM type is selected after it (or dynamically changed later).