CMake conversion

Rules are much simpler now. A whole bunch of source files were
unused and have now been removed from the tree. No more monkeying
around (pardon the pun) with stripping arguments to Yasm. Github
isn't a great place for autotools-based projects anymore as you
can't upload tarballs generated with make dist.

Bumped the imlementation version to 3.99.5, while keeping the
compatibility version at 3.0.0 (not that I think anyone is crazy
enough to link against a project with such crazy licensing terms).
Please let me know if you think I broke something along the way.
Only use ELF options if the output format is ELF

Silences warnings on OS X.