fix bug on invoking a generic function variable for function template

the cause is constructing a scope for instantiated function in
instantiate_function_template().  the scope is completely constructed
and modifying it can't affect the original function scope recorded in
in generic function type.  the solution is explicitly copying new scope
to the original scope in generic function type.  for the solution, I
made func_scope and var_symbol copy-assignable.