Choose closest valid mp3 sample rate.

Previously, the MP3 Encoder would fail silently in the worker thread if
an invalid sample rate parameter was provided.