Betti numbers of space curves bounded by Hilbert functions