Always bail out when the compositor is closed

errno can both be EPIPE and ECONNRESET when reading from the connection
after the server is closed.

Change-Id: I03b64a382db3de66819277e9955aeca3e2d7f9a1
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Fix broken include guard

Change-Id: I6f68e04c55397b702727a76ff50ea213c193cdf6
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>