Factor out Map interface

There are various implementations of the map datatype.  Making this an
interface allows consumers to swap in different implementations later,
as needs require.
Improve documentation