Use static libraries instead of shared libraries

For NA62MC Persistency, NA62Analysis libraries and user analyzers
Variable in NA62Analysis.cmake to switch between STATIC and SHARED