Move dialog bindings to dialogs.c

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Make sure to stop sampling when closing the application

Otherwise we'll run into problems the next time we open the application.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Don't unref widgets after connecting a signal to them

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>