Rigid body molecular dynamics with nonholonomic constraints: Molecular thermostat algorithms