Implement known_type/1

This is convenient for iterating available types and checking whether a
given term describes a type.  This also allows us to create a new
type (called 'type'), which describes the set of terms which are valid
types.