have range-writing functions return end offset
have range-writing functions return end offset

We have a repeated pattern where we emit a span of text,
do some logic, then emit more text picking up from where the
previous span left off.  Refactor the functions such that
keeping track of these offsets is simpler.

No functionality change, just simpler code.

drjanitor/tsickle,hess-g/tsickle,alexeagle/tsickle,hess-g/tsickle,ncfxy/tsickle,lucidsoftware/tsickle,angular/tsickle,drjanitor/tsickle,angular/tsickle,ncfxy/tsickle,lucidsoftware/tsickle,drjanitor/tsickle,ncfxy/tsickle,lucidsoftware/tsickle,alexeagle/tsickle,alexeagle/tsickle,drjanitor/tsickle