Update str_ireplace.js

This is a complete rewrite modeled after the more efficient code used in str_replace().
This replacement is fully compliant PHP 5.0 str_ireplace().

Original code does not allow for arrays, does not include optional 'count' and uses regex expressions which are unnecessary and waste of resources. With all due respect to the original author.
Glen