IIOD: Unregister the client from the r/w thread when it exits

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Fix broken detection of the high-speed mmap interface

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>