From Underground Mines to Offices: A Versatile and Robust Framework for Range-Inertial SLAM