Former Thai PM Thaksin Shinawatra will be released from prison under a royal pardon, with just over three months left on his one-year sentence.