use static libs to near zero compilation duration.

WIP, because the current implementation broke the coverage report.
Investigating.
fix compiler/linker flags

restore dynamic export and coverage support.
Merge branch 'feature/staticlib' into develop