Redo terminal reloading and fix response timeouts.

Only return a 504 when *no* response at all has been received via a
requests response channel.

Terminal reloading should help speeding up development of the javascript
client.