Automatic inference of ice models from postglacial sea-level observations: Theory and application to the British Isles