lib:tdb: Add missing overflow check for num_values in pytdb.c