Pub transformer for automatically creating static type factories.

This adds a pub transformer that allows applications built with pub build or pub serve to automatically switch between dynamic and static injection.