Add support to time out long running queries

Noisy test -- use the ' ///* enable for debugging */ ' line prefix hack on the printlns.