Add explicit conversion instead of relying on the implicit one
Fixing indentation in this complex (and possibly wrong) function

Note that it can actually fall out of the loop and return nothing (i.e.
junk). That is not good.
function_params is std::vector<...> and NUMERAL_TOK is uintval

So these are size_t and unsigned, respectively. Fixing accordingly in
smt2.y
Moving function to the header, changing it to unsigned and fixing users

It can be moved to the header, so we should, it may speed up things. The
users of the function have to take into account it returns unsigned --
there was only one user, so it was easy to fix.
Making vector hold unsigned -- it only ever is used to hold unsigned