More than 700 sub-postmasters were prosecuted across the UK, including about 100 in Scotland between 2000 and 2014.