COVINS-G: A Generic Back-end for Collaborative Visual-Inertial SLAM