Set library version correctly

We were using SOVERSION to set the full build version of our shared
libraries.  SOVERSION should only contain the first number of the build
version triple.  The VERSION property is what should contain the
library's full build version.  Also, the CMake build file now includes a
description of when and how to update the library version.  (It
*shouldn't* match the package's release version.)
Don't use GLOB to detect library source files
Better CMake 2.6 support

I guess the default output directory for configure_file in 2.6 is the
root, not the current binary directory.
Merge remote-tracking branch 'template/c-template' into develop

* template/c-template:
  Better CMake 2.6 support
  Don't use GLOB to detect library source files
  Set library version correctly
Initializer functions

This patch adds a new `CORK_INITIALIZER` macro, which you can use to
declare a function that should be automatically executed at program
startup time.  Right now we only implement this macro on GCC, using the
`constructor` function attribute.
Symbol visibility macros

This patch adds the new `CORK_EXPORT`, `CORK_IMPORT`, and `CORK_LOCAL`
macros, which can be used to declare the visibility of each function in
a library.  There is also documentation describing how to use these
macros; you usually won't use `CORK_EXPORT` and `CORK_IMPORT` directly,
but instead use them to define a `FOO_API` macro for your library.

Our “embedded” copy of libcork, which we statically link with each of
our test case programs, defines `CORK_API` to be `CORK_LOCAL`, which
seems to let the compiler apply a couple of extra optimizations.  (The
linked programs are all smaller.)
Merge branch 'feature/initializer' into develop

* feature/initializer:
  Initializer functions
Process cleanup functions

You can now register functions that will be automatically called when
the current process exits, similar to the standard `atexit(3)` function.
Our version differs in that you must provide a priority value for each
function, allowing you to explicitly define the order in which the
cleanup functions should be called.
Initialize cleanup function list at compile time

Before, we used a `CORK_INITIALIZER` function to initialize the linked
list of cleanup functions.  However, this means that you can't register
cleanup functions inside of other `CORK_INITIALIZER` functions, since
there's no guarantee what order they'll be called in.  Instead, we use a
static initializer to make sure the cleanup list is ready to go before
any `CORK_INITIALIZER` functions are executed.
Merge branch 'feature/atexit' into develop

* feature/atexit:
  Initialize cleanup function list at compile time
  Process cleanup functions