Add support for generated factories that implement interfaces.

Create methods are still generated and the implementations delegate to those.