Turán‐type problems for long cycles in random and pseudo‐random graphs