Added many_to_many relationships betweens media and products

This patch comes with some minimal (but hopefully clear and effective) tests