pylal upper limit codes: refactor and add HPD functions

remove trapezoidal integration element to its own function,
rename the minimum width interval, add Highest Posterior Density
interval calculation.  Unit tests are passed as before
Use np.clip() instead of conditional so that function works on vectors
SWIG: ensure C mode in Emacs
SWIG: make wrappings compatible with SWIG v3.0.0

- %typemaps_string_alloc() has an extra argument
- structs containing pointer-to-const members now
  need SWIGLAL(IMMUTABLE_MEMBERS(...))
lalinference: fixed NetworkSNR calculator when using margtimephi
glue.ligolw:  defer crash on missing fileobj methods

The MD5File wrapper tries to pre-look-up the file I/O methods of the file
object it has been passed.  This patch allows it to ignore missing methods
(but the code will still crash if, later, those methods were needed).
glue:  add XML reading from http:// URLs to unit tests
lalinference: removed unneeded time shifting in SNR calculation
lalinference_mcmc (malmquist): restrict dist prior for initial draws
lalinference: switch default malmquist to second loudest SNR > 5
bayespputils: added time-marginalized non-params to bayespputils
Remove reference frequency option from BAYESTAR

The reference frequency shift is no longer necessary because MBTA is now
shifting triggers to common mass parameters. For pipelines that report
triggers from identical templates in all detectors, the reference
frequency shift only serves to introduce a bias into the geocentered
arrival time.
updated PDbeam wandering diagnostic script
Merge branch 'master' of ligo-vcs.phys.uwm.edu:/usr/local/git/lalsuite
lalinference_pipe: Fix bug #1273 where pipeline only adds last IFO to command line
pulsar PE results scripts: scripts have been edited to allow the parsing of results from the nested sampling codes.
testCFSv2_FLTgrids.sh: test CFSv2 grids generated by FlatLatticeTiling

- grid types 8 (square) and 9 (spindown age-braking index), still used
  for Cas A and friends searches, so make sure these are not broken
testCFSv2_FLTgrids.sh: enable test and add reference grid files

- reference grid files generated from previous commit
testCFSv2_FLTgrids.sh: set execute permission bit

- wasn't preserved by git in previous commit, for some reason ...
testCFSv2_FLTgrids.sh: forgot to add to EXTRA_DIST