Handle external functions (add-ins).

Unfortunately we can't test this piece easily just yet.  Enabling add-in
functions would mess up the function list which is unit-tested and thus
fail if we enable add-ins in unit test.

Change-Id: Ieda5e5560d4c7e68d7c6272c5d85f2ac63bd4ee4