Update g_density to handle bilayers better

As suggested by Chris Neale, we now properly
perform the binning relative to the center rather than
merely shifting the center of the output. While at it,
I have also added a selection for the group to center on
(useful when the membrane is not in the center of
the system, say with a membrane protein), and an option
that allows us to perform the binning in relative
coordinates and output the average dimensions. The last
is useful when there are large box fluctuations. The
tool now also has an expanded help section with a few
recommendations for bilayers.

Fixes #1168.

Change-Id: Id132311f1d6cd4858f99e8f44a0266667100a406