KOBRA: a fluctuating elastic rod model for slender biological macromolecules