Add string API routines to replace substrings

4 unit tests for these two new API functions

Using the functions in parser.c when reading lines of text.
Removed `M_READ_LINE` mode, no longer used
Merge pull request #366 from caitp/issue-366

Convert NULL byte to U+FFFD (utf8 {EF,BF,BD}) in parser