Remove JHtmlBehavior::framework from the keepalive unit test as it is no longer required.
Add test to see if jQuery is loaded before testing keepalive behaviour
Refactor the keepalive js so that it is easier to read when added with other scripts.