DIC Factories: automatic resolution of parameters

Reworked from nette/nette#1289.