Split data into lines before decoding to strings

Will prevent mangling when a chunk ends partway through a multibyte
character.
Default encoding should be 'utf8' instead of 'UTF-8'
Merge pull request #358 from M2Ys4U/buffer_parse

Split data into lines before decoding to strings