CLEANUP: remove a few warning about unchecked return values in debug code

There were a few unchecked write() calls in the debug code that cause
gcc 4.x to emit warnings on recent libc. We don't want to check them
as we can't make anything from the result, let's simply surround them
with an empty if statement.

Note that one of the warnings was for chdir("/") which normally cannot
fail since it follows a successful chroot (which means the perms are
necessarily there). Anyway let's move the call uppe to protect it too.
diff --git a/src/session.c b/src/session.c
index e814903..017ac26 100644
--- a/src/session.c
+++ b/src/session.c
@@ -2063,7 +2063,7 @@
 				      s->uniq_id, s->be->id,
 				      (unsigned short)s->si[0].fd,
 				      (unsigned short)s->si[1].fd);
-			write(1, trash, len);
+			if (write(1, trash, len) < 0) /* shut gcc warning */;
 		}
 
 		if (s->si[0].state == SI_ST_CLO &&
@@ -2072,7 +2072,7 @@
 				      s->uniq_id, s->be->id,
 				      (unsigned short)s->si[0].fd,
 				      (unsigned short)s->si[1].fd);
-			write(1, trash, len);
+			if (write(1, trash, len) < 0) /* shut gcc warning */;
 		}
 	}
 
@@ -2179,7 +2179,7 @@
 		len = sprintf(trash, "%08x:%s.closed[%04x:%04x]\n",
 			      s->uniq_id, s->be->id,
 			      (unsigned short)s->req->prod->fd, (unsigned short)s->req->cons->fd);
-		write(1, trash, len);
+		if (write(1, trash, len) < 0) /* shut gcc warning */;
 	}
 
 	s->logs.t_close = tv_ms_elapsed(&s->logs.tv_accept, &now);