Small fixes (PR #3022)

- Fix incorrect variable in mb_strlen() compat
- Micro-optimization of array_replace(), array_replace_recursive() compat
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop