Refactor the CMake file to work with CMake 3.8.2
Refactor the CMake file to work with CMake 3.8.2

Summary:
The dirty hack I was using to link `folly_base` into `folly` doesn't work in newer versions of CMake :(
This refactors the makefile to not need to dirty hack by using an object library rule instead. It also makes the compiler version detection more generic.

Reviewed By: yfeldblum

Differential Revision: D5158919

fbshipit-source-id: cd052a5f58ed3d88c377c68cca07ca8497ca0c7a

rklabs/folly,facebook/folly,Orvid/folly,facebook/folly,rklabs/folly,Orvid/folly,Orvid/folly,rklabs/folly,facebook/folly,facebook/folly,rklabs/folly,rklabs/folly,facebook/folly,Orvid/folly,Orvid/folly