[Misc] Improve the integration tests of the xwiki-platform-wiki module.

(cherry picked from commit c52df45af60f72af1f45f4b3251fedb5f4101f6e)
[misc] Attempt to fix flickering tests in platform.

(cherry picked from commit 127778a2e7a6f4c468a6d0e7affc2973fc5ff1f8)
[misc] Fix flickering test (remove the call to waitUntilPageIsLoaded because we have overwritten it below; the call shouldn't be needed anyway).

(cherry picked from commit 285170eed2cb04d719b649ca6e0c5336206efbe8)
[misc] Fix compatibility with Java 6.