cmake: use cmake 2.8 OBJECT target type to manage static and share libs

With the OBJECT target type, the common and encoder folders are compiled to
object files but not linked until main static or shared library is built. This
removes the need for mergestatic.cmake and cleans up a lot of messy problems -
at the cost of requiring a somewhat recent cmake.

For MSVC (and presumably Xcode) we must keep the assembly as a static lib since
it uses custom build commands which do not work with OBJECT target types.  This
static lib is then linked with the main x265.lib or x265.dll

The X265_EXPORT macro is no longer necessary since we are generating both the
static library and shared library from one compile we are forced to use an
x265.def file to define DLL exports.  x265.exe must link with the static library
because on Windows the static lib will be empty if no EXE links with it.

x265_mdate() was moved into the CLI x265.cpp so the CLI could link with the
shared library if necessary (x265_mdate is not exported)