Magnetic trapping of buffer-gas-cooled chromium atoms and prospects for the extension to paramagnetic molecules