bc: make bc_program_addFunc() return new idx, untangle &p->fidx interaction