buffer::ptr::cmp only compares up to the smallest length

When running

  bufferptr a("A", 1);
  bufferptr ab("AB", 2);
  a.cmp(ab);

it returned zero because. cmp only compared up to the length of the
smallest buffer and returned if they are identical. The function is
modified to compare the length of the buffers instead of returning.

http://tracker.ceph.com/issues/4170 refs #4170

Signed-off-by: Loic Dachary <loic@dachary.org>