Add a few methods needed for moving into base
Force stagedfunction to be explicit about eltype and ndims

This circumvents the inference problem in
https://github.com/JuliaLang/julia/issues/8504