rework organisation of integers and string/int/num conversion functions

in particular, don't want two copies of int_to_string, so move the
definition from the replScript to semanticPrimitives (for earlier
access).