#176 Moved Resource closure from DefaultHost to HttpThread

This should prevent the resource from being unavailable before it is written to the client, as per #176.