add new Symfony factory syntax support

This resolves #21.
Thanks for your review @stof! The `method_exists()` check is tricky here. It should be:

```php
if (method_exists($definition, 'getFactory')) {
    $factory = $definition->getFactory();
    if ($factory !== null) {
        return $factory;
    }
}
```
Because maybe the definition still has a factory class or service.