Fixed Ajax.activeRequestCount glitch.

Ajax.activeRequestCount sometimes went to -1 therefore breaking our automation. I changed all conditions to count with this issue.
Merge pull request #896 from mfalesni/js_whoa

Fixed Ajax.activeRequestCount glitch.