web: Better population of Docker DOM for containers and images

Normalize the DOM a bit and check for missing bits when we
get stuff from Docker. Use single functions where all the
population of the DOM objects happen.

Fixes #352
Closes #362
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>