Rework SvtListener and SvtBroadcaster internals.

The old code was simply awkward.

Change-Id: I1a58a9af86c100be238d306570b40f70c5100314
No need to individually remove listeners when being destroyed.

Otherwise a crash would ensue.

Change-Id: I9a52524cc205765d059745e9f7e914b636667cb6
Optimize SvtBroadcaster for insertion.

This helps file load performance at the slight overhead during editing.
That said, the overhead during editing is only in theory (not measured) and
shouldn't be that much even in theory.

Change-Id: If22ea34acb0cda311575ac3ed8ce1a8eb69ae33a
Do everything on main thread when the thread count is 1.

This helps debugging / profiling easier.

Change-Id: I7834585bf2aa5d5f550bd218b9845ec964b06655
Identify methods that don't modify internal state and mark them const.

Change-Id: Ie63d93d51640bfb80dc02bb226d742c2f9be96d8
Remove unused member.

Change-Id: I8331251f77fb202375370a425e01862aa0f6310d
Create string from token array directly from ScTokenArray. Still WIP.

And make it re-entrant for thread safety. This method should not modify
the internal state of the token array object. The one with ScCompiler
is not re-entrant. Still some way to go.

Change-Id: I06de3637341727aef0963dddfb98527f415bf7fa