Hundreds of sub-postmasters who exposed wrongdoing will now be able to recover their losses in full.