Cosmetic renaming for consistency between DataTree method names.
(manually cherry picked from commit da615507f486cb25eb539cbbbe71dc9f7d34fe67)
Introduce a new abstract class for external function nodes.

This fixes the following bugs:

- 1st and 2nd ext fcn deriv nodes were incorrectly added to
  DataTree::external_function_node_map, because of the chaining of
  constructors.

- the following methods of FirstDerivExternalFunctionNode were not overloaded:
  toStatic(), buildSimilarExternalFunctionNode()

- the following methods of SecondDerivExternalFunctionNode were not overloaded:
  toStatic(), buildSimilarExternalFunctionNode(), compile(),
  compileExternalFunctionOutput()
(cherry picked from commit b4c3d004ad6c8c19aa56a477677d1c6c89f8f23e)
Fix crash when the model contains 1st or 2nd ext fcn deriv nodes.

In the case where the external function computes itself its derivatives, the
TEF terms were not always created before being used, hence leading to a
preprocessor crash. This problem could only happen with ramsey_policy, because
otherwise the model does not contain derivatives of external functions.
(cherry picked from commit 2495359919b2ecbfa7b36d07ad507eca4bc1ce96)