Refactored AgaviContext::initialize() and the passing of "profile", closes #702