Document thread detection was faulty. Fixed this by storing the actual document thread ID insinde the sink.

Signed-off-by: Arne Seib <arne@salsitasoft.com>