tests: use memcmp to compare binary buffers

instead of strncmp because it will stop at the first \0

http://tracker.ceph.com/issues/6697 Fixes: #6697

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Merge pull request #2567 from dachary/wip-6697-strncmp-vs-memcmp

tests: use memcmp to compare binary buffers

Reviewed-by: Sage Weil <sage@redhat.com>