bug 1089238 - use test/httpd to simulate readyState timings

let's just make one `function checkDone(tab, count)` definition, which takes count as an input.