[brace-fold addon] Allow single-line folds
[foldcode addon] Modernize interface

(Old newFoldFunction interface preserved for backwards-compatibility.)
Don't leave gaps in selection under replacedWith ranges