refs #4996 many new tests and many bugfixes. Tests should be done now except for cross browser support. I fixed many issues as I did not consider that link tracking may be disabled or enabled and the behavior should be different in such a case.