Autoselect sample rate

Pick a sample rate that is compatible with both the input and output devices.  Previously we assumed 48 kHz is supported.

Also log more audio troubleshooting information to aid debugging.