Last-Event-Id header support

Pretty much self explanatory.

Also includes some fixes to keep the connection active when the server side closes the connection.