speex_write() previously unlocked the channel immediately after
looking up the speex datastore, then continued to create, modify,
or destroy SpeexPreprocessState and related direction data without
the lock. speex_callback() runs from the media path with the channel
already locked, so concurrent Set(DENOISE)/Set(AGC) could free or
mutate that state while preprocess was running and crash inside
speex_preprocess_run().
Keep the channel locked for the full configuration update, unlock
before ast_audiohook_attach()/detach(), and hold the lock across
speex_read() while copying values out of the datastore.
Fixes: #2091