Add reinstating of text inputs on back button.

(needs tests still but I've just noticed there are no tests for any of the re-instation stuff so will do it all in a later commit.)
Add history for radios

- Radios reinstation uses the same functions as checkbox reinstation so generalise restoreCheckboxes to restoreBoolean so they support both.