Refactors map marker kind management

Moves map marker kind management to its own module. This isolates the
erb parsing for the map marker images into one file and allows the
result map manager and detail map manager to share the same logic for
determining the kind of icon to display.
Additionally:
- Adds a reset method to the bitmask utility module so all bits can be
switched off in one call.
- Adds a kind value to the embedded marker data in the details view.
- Trims embedded marker data in the details view and removes embedded
data from the DOM when it is no longer needed.