Great Britain will posthumously pardon thousands of gay and bisexual men who were once considered criminals.