Automatically set type of new prefix in CLI

The CLI is now able to set (if unset) or override the type of a new
prefix, should it be necessary to conform to our consistency model.

It is mainly for registering hosts, because that's the only real
scenario where we know that the child prefix must be of type 'host'.

Fixes #275