Add "stateful" feature type with initial feature "last n"

Stateful feature extraction functions are functions that require state to be maintained between successive calls.  This is necessary, for example when an accumulation of values is required, or changes need to be measured over time.

The initial xtract_last_n() function accumulates the last N (single) values from *data and writes them to *result
Add xtract_peak() determines whether the 'current' value is a peak