In over 40 countries, laws against homosexuality are a lasting legacy of British rule