Judges quash convictions of 39 former postmasters after the UK's most widespread miscarriage of justice.