Fixes to ensure NIST validation tests now all pass

Fix arithmetic IF to use the expression type rather than always cast to
integer. Fix statement function argument type override.  Fix ANINT
intrinsic which was being calculated wrongly.  Add FORMAT string
validation. Add stdin and stdout constants in IO library and export
those. Format class refactoring to clean it up.