Comedy writer claims he was offered a payout to step away from a stage version of Ireland-based sitcom, amid controversy surrounding his remarks about the trans community