Account for nterms in calculating size of visbuffer for IDG
Created by: aroffringa
When applying multiple terms, multiple IDG buffers are allocated. I forgot about this when implementing changes to calculate the IDG buffer memsize based on the free mem. This resulted in out-of-mem problems when predicting with multiple terms (as reported by @darafferty ).