simplified invoke process of match_expr

this patch reduces the complexity and code size for the invoke
process of match_expr by using a recursive `unroll_expr` function
rather than using nested template metaprogramming facilities;
futhermore, this patch reshapes `apply_args` to take a tuple with
an indices list, aiming to replace the clumsy `apply_tuple` family
in the long run