Catch kill signals in corr_grab_h5.py

Previously, KeyboardInterrupt triggered a graceful exit, but
the kill signal initiated by amisa over ssh didn't, leading to corrupt
files.
This commit adds catching of the SIGINT and SIGTERM signals, using
the signal module. A timeout has also been added to halt
data collection when no new metadata has been received in the last
10 minutes