Add an --enable-code-coverage configure option to enable gcov support

When enabled, this will compile all libraries/binaries with the necessary
gcc and ld flags to enable code coverage support using gcov.