malloc_trim() is not available in musl libc

So detect it and use it conditionally.

Closes #135
2 jobs for sam/malloc-trim-glibc-only in 1 minute and 51 seconds
Status Job ID Name Coverage
  Test
passed #913113
test-fedora-latest

00:01:35

passed #913114
test-ubuntu-rolling

00:01:51