New check: initialization by itself in initializer list (#3982)

Refactorizations:
- Rearranged code in checkclass.cpp to increase readability
- Several fixes for testclass.cpp tests.