Abs evaluates as integer/rational when needed

Added many tests as well.