[5.0] Use Container Contract In Database Connection Factory

PhpStorm was screaming at me when I tried to pass an application instance into the connection factory.
Done.