[cmake] Add an option to build the secp256k1 library as shared
Summary: This does not affect the other libraries and make it easier to build the shared libsecp256k1 from the monorepo.
Test Plan:
cmake -GNinja .. -DSECP256K1_BUILD_SHARED=ON ninja secp256k1
Check the shared lib is produced.
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D16700