Modular rail-mounted switchgear