add new Symfony factory syntax support

This resolves #21.
Actually, if you define both factory and factory class in Symfony 2.6, factory is used. So it should be checked first