debian, rpm: build rocksdb statically if we can

Signed-off-by: Sage Weil <sage@redhat.com>