[ready-for-review] Migrate image data to its own table

[closes #767]

@mlasson, @toolness, @cmcavoy one/all of you should check this out, see if I'm missing anything or if I did anything weird.