ssa_path_record_data.c: Return error from index building routines if a DB table is empty

Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>