Port couchbase.m4 improvements from libvbucket
Port couchbase.m4 improvements from libvbucket

Particularly -O3 is not anymore silently added to CFLAGS ruining any
ability to debug.

Another significant change is verifying -fvisibility=hidden is really
supported before trying to use it.

Those are http://review.couchbase.org/14522
http://review.couchbase.org/14523 http://review.couchbase.org/14524

Change-Id: I901d681f50d598fe1d1f541cf600e573122c9a40
Reviewed-on: http://review.couchbase.org/14605
Reviewed-by: Damien Katz <99e6b749acbfbe2a596df99e91d24d6e1fdbee00@couchbase.com>
Tested-by: Damien Katz <99e6b749acbfbe2a596df99e91d24d6e1fdbee00@couchbase.com>

jimwwalker/couchstore,hsharsha/couchstore,vmx/couchstore,couchbaselabs/couchstore,jimwwalker/couchstore,couchbaselabs/couchstore-specials,couchbaselabs/couchstore-specials,t3rm1n4l/couchstore,abhinavdangeti/couchstore,couchbaselabs/couchstore,jimwwalker/couchstore,abhinavdangeti/couchstore,hsharsha/couchstore,vmx/couchstore,t3rm1n4l/couchstore,couchbaselabs/couchstore-specials,t3rm1n4l/couchstore,hsharsha/couchstore,vmx/couchstore,couchbaselabs/couchstore-specials,hsharsha/couchstore,couchbaselabs/couchstore-specials,couchbaselabs/couchstore,abhinavdangeti/couchstore