[clang-tidy] Fix segfault in cppcore-guidelines-special-member-functions check
Use a set rather than a vector of defined special member functions so
that multiple declarations of the same function are only counted once.
Move some private static member functions into the cpp file.
Run clang-format on header.
Reviewers: ericLemanissier, Prazek, aaron.ballman
Subscribers: Prazek, cfe-commits, nemanjai
Differential Revision: https://reviews.llvm.org/D23008