rbd.cc: tolerate lack of NUL-termination on block_name_prefix

Fixes: #7577
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>