perform various optimizations to AIREBO/omp.
this moves several frequently called small subroutines
into the class definition for inlining and uses the
templated function scheme to move invariant tests outside
of the subroutines and generate multiple variants of
the functions at compile time.