Add support $config param

Allow the $config param to continue to work from the JFactory::getApplication() function or the legacy JApplication::getInstance() function