Renamed OutputFactory to BufferedFactory

This clarifies that the factory can produce things other than function
outputs, depending on the circumstance.
Added OutputFunction interface

An OutputFunction is a Function, which can provide the output object on
its own given some input object.