Added support for a custom class factory

One use case for this is modeling a React component as a typescript
class with injected constructor arguments, and then having a "static"
diCreate function on that constructs an instance of the class and passes
it to React.createElement