Add prerm hook that stops clangd.

Also, add libcounter.so to the packages.