Added crash detection to HTTP session processing

To help debug a problem that causes the server to hang.
Added datetime comparisons to unit tests