VIM-702 Fix infinite loop on s/$/\r/g

If the replacement contains newlines, the line number of the current
search position needs to be adjusted. Without this, e.g. s/$/\r/g would
get into an infinite loop.
VIM-848 Show line numbers if they are enabled in the settings and there is no 'set number'
Merge remote-tracking branch 'dezgeg/fixes/vim-702-fix-substitute-infinite-loop'
Updated changelog
Version 0.39