Bill to undo convictions for consensual gay sex introduced 32 years after decriminalisation of homosexuality