A former Post Office sub-postmistress caught up in the Horizon scandal has had her wrongful conviction quashed.