Don't send invalid UTF-8 string
Don't send invalid UTF-8 string

When a rune stands over the buffer boundary, invalid UTF-8 bytes were
sent to the client. Now the logic checks if the tail of the buffer can
be decoded as a valid rune. When it's an invalid byte sequence, the logic
keeps it in the buffer and send it in the next loop with the following byte sequence.

jasonchaffee/gotty,abhishekgahlot/gotty,snowsnail/gotty-1,yubo/gotty,aOJzQT/gotty,abhishekgahlot/gotty,ruo91/gotty,codeskyblue/gotty,Ryezhang/gotty,freakhill/gotty,ujuettner/gotty,moul/gotty,moul/gotty,yubo/gotty,yubo/gotty,snowsnail/gotty-1,vjscjp09/gotty-test1,stigkj/gotty,rmetzler/gotty,abhishekgahlot/gotty,ivan-mlnn/gotty,freakhill/gotty,uovobw/gotty,paran0ids0ul/gotty,whismat/gotty,ruo91/gotty,hernad/gotty,ujuettner/gotty,jasonchaffee/gotty,jasonchaffee/gotty,hernad/gotty,yh453926638/gotty,uovobw/gotty,rmetzler/gotty,yudai/gotty,snowsnail/gotty-1,stigkj/gotty,xiaods/gotty,rmetzler/gotty,QuentinPerez/gotty,ruo91/gotty,moul/gotty,QuentinPerez/gotty,ivan-mlnn/gotty,aOJzQT/gotty,codeskyblue/gotty,QuentinPerez/gotty,CiscoCloud/gotty,linuxsky/gotty,ujuettner/gotty,whismat/gotty,CiscoCloud/gotty,paran0ids0ul/gotty,ivan-mlnn/gotty,paran0ids0ul/gotty,wdxxs2z/gotty,xiaods/gotty,vjscjp09/gotty-test1,wdxxs2z/gotty,aOJzQT/gotty,vjscjp09/gotty-test1,whismat/gotty,yubo/gotty,CiscoCloud/gotty,linuxsky/gotty,yudai/gotty,linuxsky/gotty,Ryezhang/gotty,yh453926638/gotty,yubo/gotty,moul/gotty,yudai/gotty,hernad/gotty,uovobw/gotty,Ryezhang/gotty,wdxxs2z/gotty,xiaods/gotty,vjscjp09/gotty-test1,codeskyblue/gotty,stigkj/gotty,yh453926638/gotty,yudai/gotty,freakhill/gotty