fix counter tests, they must fail on rails4 because of rails4 bug
update tests to rails 4.0.12
update tests to rails 4.1.8
improve counter cache tests
workaround for counter_cache bug on rails4 (#14849)
improve rails3 counter cache workaround for deleted children and parent changes