added a comment - - edited
Some comments, surely none (but 5, tiny detail) preventing integration:
1) In various places you are "accumulating" into keyed arrays different things (browser_security_choices, sql_params, settings...) and I think it's ok, but if for some circumstance sort of reuse (in brand-new plugin implementation) of the same keys happens. Perhaps it would be safer to add some unique prefix to every element or perform some check looking for duplicates, or keep those elements under its rule boundaries, not using them to populate external arrays... I know this is hardly going to happen but seems possible.
2) All files are © Open University but mod/quiz/accessmanager.php that is © Tim
3) The dots in comments, lol, I'm about to ignite one war against them
4) On upgrade... won't be easy to make '-' the DB default and then only update old popup = 1 and 2 ? And keep the default enabled? I don't think leaving potentially some '[unknownvalue]' there is a good idea.
5) Also on upgrade step 2011100604 isn't the switch...case statement missing breaks?
6) Once again, plz avoid mixing unrelated wrapping changes with the fix it really makes things harder here. It's complex enough without all those changes, hehe.
7) Trying to execute 'mod/quiz/accessrule' unit tests ends with error (guess you need to include some missing stuff):
Fatal error: Class 'quiz' not found in /mod/quiz/accessrule/delaybetweenattempts/simpletest/testrule.php on line 49
I think it looks interesting and cuasi-perfect (although I don't like your coding style at all, pffff. :-P). Of course, there are a lot of code I don't understand but it is correct from a coding POV, fair enough. That and the abundance of unit tests aim me to integrate this after hearing from you above the points above, thanks!
Ciao 
Informal list of subtasks:
1. Refactor existing code into subplugins with minimal changes..
2. Make quizaccess_plagiarismcheckbox contrib plugin to drive further changes.
3. Verify subplugin DB tables get created.
4. A way to get a new field on the quiz settings form.
5. Save the setting when the form is submitted.
6. Load the setting when the quiz is re-edited.
7. Load the setting when a quiz attempt is started.
8. Refactor password check into renderer and to be pluggable.
9. Clean up secure window initialisation.