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.