make core `eltype` definitions operate on types

This way, when the type entirely determines `eltype`, a single definition is enough to make `eltype` work for both types and values. We were not consistent about this before; some types supported it and others didn't.