Added sign check to charge_pair_abs potential

The potential contains a square root of a function that may be
negative, which can lead to NaN. If negative values are encountered,
the potential is given a zero value to avoid problems.
Typo fix

The previous comment had an error that would prevent compilation.
Included 2pi factor in Ewald parameter determination

When converting from k_cutoff to k-space summation ranges in Ewald
setup, the ase.Atoms.get_reciprocal_cell() function is used which does
not include the 2pi factor usually used for the reciprocal cell. This
makes the k-cutoff essentially 2pi times longer than expected if the
standard definition of a reciprocal cell is assumed. This update adds
the factor 2pi in explicitly.
Some code optimization

In order to avoid repeating code, some fairly large arrays (bond order
factors) were set to 1 when not used with an interaction (in the
Fortran core). This took a reasonably large amount of cpu time, so now
the code is repeated with and without the arrays.
Implemented bond order factors affecting atomic pairs

So far bond order factors have only acted on individual atoms, and
factors on pairs or triplets have been formed by averaging the atomic
factors

    b_{ij} = (b_i + b_j)/2

However, the Tersoff bond order factor should be defined for pairs
directly. Here, the framework for such factors is implemented and the
Tersoff factor is included.

The Python interface is fairly similar to the old (incorrect) Tersoff
factor. The manual needs to updated to take into account the new
structure. Also code tidying and further bug testing is needed.
Bond factor parameterisation update

Changed some details in the way parameters are given to bond order
factors and added substantial new documentation on how pairwise factors
work.
Warning system (closes #1)

Implemented a warning system. The warnings are handled by the Warning
class in pysic.utility.error, and can be simply called using the
warn(message,level) method.

Warnings are printed simply by importing warn and then calling, e.g.:

    warn("Look here!",3)

The warning level is an integer between 1 (severe) and 5 (note), and
all warnings whose level is below the notification level (by default 3)
are printed. The notification level can be adjusted using
pysic.utility.error.set_warning_level(). Note that if the notification
level is 0, no warnings are printed, and if it is 6, any warning of
level 1-3 will result in an Exception being thrown in order to stop
execution.

The warning levels are:
1: a condition that leads to unwanted behaviour (e.g., creating
redundant potential in core)
2: a condition that is likely unwanted, but possibly a hack
3: a condition that is likely unwanted, but is a featured hack (e.g.,
bond order mixing)
4: a condition that is harmless but may lead to errors later (e.g.,
defining a potential without targets - often you'll specify the targets
later)
5: a condition that may call for attention (notes to user)
Bond order core bug fixes

Fixed some bugs in the core access functions for bond order factors.
Since the way bond parameters were grouped changed, some functions that
hadn't been updated to the new format could give Segmentation faults
due to errors in array indexing.
Global memory handling update

Switched some large arrays from local (defined in a function) to global
memory allocation. This avoids re-/deallocating memory during
simulation which is a slow process.
Apply k-space cutoff directly in Ewald

Previously the given k-cutoff radius was only used for determining the
k-summation cutoffs for Ewald, which decide how many times the sum goes
over shifted periodic images of the reciprocal cell. However, there is
really no need to calculate the structure factors for all k in that
region - which has a rectangular shape (or in general triclinic) - in
fact it makes more sense to use a spherical cutoff. Now the summation
over k is also truncated according to the absolute length of k to save
calculating all the structure factors.

Also a function for guessing Ewald parameters was included and a bug in
initializing the parameters upon creating a CoulombSummation was fixed.
Ewald combined with real space sum of potentials

The ewald summation is now done along with the rest of the real space
summation of potentials to avoid looping over neighbors twice. It is
possible to do the real space sum also along with the reciprocal sum in
the ewald subroutines, but when called from the force and energy
calculation routines, this is avoided.

Also fixed bugs that would lead to segmentation faults when a
calculation was run without any potentials. This was due to some arrays
being initialized only when potentials were being created.
Severe bug fix in triplet finding

There was a bug in the algorithm that searches for local triplets. In
one location, index j was used when fetching pbc_offsets when index l
was actually needed. One letter index error!
Serial version fix

Some old code had been left in the serial branch of the code causing an
error on compile.
Documentation update

Also added a lower limit to the c_scale bond order scaling function.
Bug fixes

Fixed some potentially severe bugs, where wrong indices could lead to
index-out-of-bounds errors in Fortran.

Also fixed a bug in Python where the neighbor lists were not
necessarily reset even if full core initialization was required.
Calculator wrapping

Added support for calculator wrapping in Pysic. This means one can use
Pysic to store several ASE calculators and have them be summed together
when the calculation routines of the Pysic calculator are called.
ASE 3.7 update

ASE 3.7 changes get_charges() and set_charges() in the Atoms object,
which breaks charge routines in pysic. This update includes quick fixes.

The update is superficially tested to work on both 3.6 and 3.7.
Merge branch 'develop'