CCBC-380: Allow customizing compiler flags via cmake/configure

This adds the ./configure-like behavior of recognizing `CFLAGS`,
`CPPFLAGS`, `CXXFLAGS`, `CXX`, and `LDFLAGS` to do the right thing.

Change-Id: Ib225e13c144e1738d106177b51bed077adc70924
Reviewed-on: http://review.couchbase.org/38467
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>