backward compatibility for TreeBuilder

Reintroduces treeBuilder at its old location (Global.treeBuilder) by
routing it from the new location (Parsers.treeBuilder) for the sake of
being friendly to tools that might depend on it.
precise return type for FlagsAsBits.unapply

This will help the pattern matcher to emit better code for this kind
of extractor that does nothing but wrap the extractee.