library names end with _debug in debug build

- Adds a cmake configuration option to CMakeLists.txt telling cmake to append
  a postfix to library names generated as part of a debug build. To generate a
  debug build one can run cmake with -DCMAKE_BUILD_TYPE=DEBUG. Release builds
  (the default) are unaffected.