DIC Factories: automatic resolution of parameters

Reworked from nette/nette#1289.
Actually this line can be removed completely and it will still work. Not sure what the correct coding style is though.