MINOR: buffer: replace buffer_empty() with b_empty() or c_empty()

For the same consistency reasons, let's use b_empty() at the few places
where an empty buffer is expected, or c_empty() if it's done on a channel.
Some of these places were there to realign the buffer so
{b,c}_realign_if_empty() was used instead.
diff --git a/src/buffer.c b/src/buffer.c
index 416cb4c..16372bf 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -102,9 +102,7 @@
 		memcpy(pos, str, len);
 
 	b->i += delta;
-
-	if (buffer_empty(b))
-		b->p = b->data;
+	b_realign_if_empty(b);
 
 	return delta;
 }