Use analysis nbsearch for surface area calculation
This improves the code in several ways:
- Amount of code that does the actual computation is reduced by about
75%, making it significantly easier to follow.
- Computation with PBC no longer does an all-pairs search.
- The grid search is correct for triclinic cells (the old
implementation would not have given correct results if the bug that
caused an all-pairs search would not have been there).
- All optimizations in the generic nbsearch code benefit also this
algorithm: it is no longer limited to using grid cells that are
larger than the cutoff, reducing the search volume considerably.
Also remove some other micro-optimizations to make the code clearer.
These can be reintroduced if they have a measurable effect on the
performance; a TODO in the code explains what they were.
Change-Id: I8f68c56992305e4b82c128d33cac50315b9d2824