build: improve X11 detection on OS X

/usr/X11R6 doesn't exist on OS X per default (anymore). Therefore add
PATHS to all X11 detection modules pointing to the Xquarz installation
directory in /opt/X11.
For FindX11 it was also necessary to ensure that the frameworks are
searched as last (after PATHS) otherwise it could happen that X11 headers
of a framework (e.g. Tk.framework) were used.
rdtk: build samples only if WITH_SAMPLE is enabled
Mac: set policy to silent cmake >= 3.0 warnings

Set the following policies to "OLD" if cmake version is greater than
2.8.12:

CMP0026 - Disallow use of the LOCATION target property
CMP0045 - Error on non-existent target in get_target_property
build: cmake 3.1 compatibility

* fix problem with REMOVE_DUPLICATES on undefined lists
* since 3.1 file(GLOB FILEPATHS RELATIVE .. returns single / instead of // as
  previously - necessary adoptions for regex and matches done. Should
	work with all cmake versions.

Tested with 3.1.0-rc3
rdtk/shadow: install libraries versioned
Merge pull request #2276 from bmiklautz/build_fixes

Build fixes
xfreerdp: fix RDP order color conversion

Note: /gdi:sw was working fine, this commit fixes /gdi:hw

* calculate color channel shifts based on X11 visual color masks
* fast path to skip conversion if visual color masks equal rdp color masks
* successfully tested 8/15/16/24/32 bpp rdp sessions on 16/24/32 bpp visuals
Merge pull request #2277 from nfedera/fix-2014-12-15-01

xfreerdp: fix RDP order color conversion
Update drdynvc_main.c

fixed memory leak
Merge pull request #2278 from erobertor/master

Update drdynvc_main.c
Merge branch 'master' of github.com:FreeRDP/FreeRDP

Conflicts:
	client/X11/xf_client.c
channels/cliprdr: add missing messages in cliprdr server