SoftAE: make sure we hold sink lock when we consume and write to sink

This make sure that sink delay and buffers are kept in line.
SoftAE: let SoftAEStream share SoftAE stream lock

This avoids holding an internal stream lock, while soft ae
is trying to read out new frames and allow us to properly
hold lock while requesting delays.
softae: use correct number of bytes when consuming from src buffer
softae: add fail safe to WriteSink to avoid deadlocking on broken output
softae: verify we have enough samples in WriteSink

Some other thread may have killed the buffer behind our backs
softae: make sure we hold sink lock when we kill of sinks
Merge pull request #2791 from elupus/softae

Softae locking fixup