Added CPPCOMPONENTS_DEFINE_FACTORY macro to easy defining get_component_factory