Fix two race conditions in sinproc (fixes #114)

Includes (slighly modified) disconnction fix by David Beck (#164)

Signed-off-by: Paul Colomiets <paul@colomiets.name>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Devid Beck added to the AUTHORS file.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>