restore non-parametric Min and Max templates; fix Select[T] and Sum[T]
comment
add integration tests (adapted from genwriter)
implement non-parametric Average; refactor tests