This avoids getting different warnings when running cmake or autotools.
It moves secp256k1 flags to the appropriated CMakeLists.txt, avoids
flags duplication and enable -Wthread-safety-analysis with cmake.
The leveldb flags have not been updated and cmake still removes some
more warnings than autotools.