Add -D__STDC_CONSTANT_MACROS and -D__STDC_LIMIT_MACROS to CXXFLAGS

- these are C++-specific, so no need to add them to CPPFLAGS
- and remove duplicate definitions in SWIG configuration
Reorganisation of non-recursive Makefile fragments

- with an eye to using them also for LALApps in the future
- move basic build code to build_common.am
- keep only build code that only makes sense at top in topdir_common.am
- move pkg-config file specification to Makefile.am (not in LALApps)
- move extra preprocessor flags to configure.ac (not all in LALApps)
- use top_{src,build}dir instead of {src,build}dir for clarity
- set up LAL_DATA_PATH and LAL_DEBUG_LEVEL for tests
XLALCHARReadSequence(): use gzgetc() return value to decide when to stop

   - ... rather than relying on an obscure behaviour of gzeof() that seems
     to fail platform-dependently
   - now works correctly on both Debian squeeze (where it failed
     previously) and jessie (where it worked previously)
   - fixes #1165
StreamSequenceInput.c: removed all trailing whitespace
re-activated FileIOTest after XLALCHARReadSequence bugfix

   - refs #1165, #1138
Implement the IMRPhenomP model for precessing BBHs.

- IMRPhenomP is a frequency domain model for GWs from precessing binary
  black-hole systems.
- The code is tightly coupled to IMRPhenomC. To allow for code reuse and
  modifications in IMRPhenomP the IMRPhenomC code was split into internals
  and main functions.
- A current set of tests for IMRPhenomP has been added in TestPhenomP.c.
- Fix amplitude prefactor.
- Note: IMRPhenomP does not exactly agree with IMRPhenomC for aligned
  spin configurations due to the use of a different final spin formula.
fixup! Implement the IMRPhenomP model for precessing BBHs.
Put C on top of AC_LANG stack after MPI check
Comment out printing of template and likelihood counters for BAMBI
LALMetaIO: use non-recursive Makefile

- refs #1163
LALStochastic: use non-recursive Makefile

- refs #1164
cbcBayesCompPos.py: Disable legend also on cumulative plot if user specified --no-legend
cbcBayesCompPos: Tidy up cumulative histograms
cbcBayesCompPos.py: Fix typo in section name
cbcBayesCompPos.py: Add --no2D option for speed
hveto: Add summvars writing function
dqsegs: Wrong package name
laldetchar-segments-from-data: Add bitmask operator