Check current line ending before replacing it with new value, NOEOL line is not necessary last one

Show '*' when mixed EOL in file is found

Remove Binary encoding selection - can not be saved anyway

Code deduplication

Based on TortoiseSVN revision 24236, 24237

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>