[gsubgpos] Make (Chain)Context funcs templatized Unfortunately they still won't be inlined because the matcher_t needs function pointers. So, no speed up. Going to revert.