Initializes a Stringy object and assigns both str and encoding properties
the supplied values. $str is cast to a string prior to assignment, and if
$encoding is not specified, it defaults to mb_internal_encoding(). Throws
an InvalidArgumentException if the first argument is an array or object
without a __toString method.