stagedfunctions: specialize for all input types
Expand stagedfunction tests
Merge pull request #8457 from timholy/kf/staged

mlubin's stagedfunction fixes