Cython objective function for solve_network

Old objective function was slow because we had dict lookups for each
function term to map edges to catalog indices (and thus indices in
parameter space). In the cython objective function we unroll the hash
into arrays that are the number of terms to make the indexing quick.