don't deselect radio buttons in data-toggle

Incorporates the code from PR https://github.com/twbs/bootstrap/pull/10787 and the test from PR https://github.com/twbs/bootstrap/pull/10385

Also see https://github.com/twbs/bootstrap/pull/10206

Fixes https://github.com/twbs/bootstrap/issues/9920