Simplify using map_find.

It returns a pointer which must be dereferenced to get the value, so
null looking like zero isn't actually a problem.
Add and use a lookup-with-default map template.

As an alternative to map_find for value types.
Simplify