“The essential rationale of the illegality doctrine is that it would be contrary to the public interest to enforce a claim if to do so would be harmful to the integrity of the legal system … In assessing whether the public interest would be harmed in that way, it is necessary (a) to consider the underlying purpose of the prohibition which has been transgressed and whether that purpose will be enhanced by denial of the claim, (b) to consider any other relevant public policy on which the denial of the claim may have an impact and (c) to consider whether denial of the claim would be a proportionate response to the illegality, bearing in mind that punishment is a matter for the criminal courts.”