Refactor versions helpers for a little more clarity

These methods are still fairly tangled, but are slightly better than
they were. Having to always support old versions which have http_status
as well as newer ones with type makes this more complex - we could try
to rewrite history so that existing versions store a mapping type change
as type rather than http_status, but we don't want to tackle that at the
same time as adding the type column.

This also adds a comment explaining that we always need to support http_status
in older versions.

http_status_name is only used in a versions helper method now, so should
be there rather than with the mappings helpers.