logical_id and product handling

Here is what I thought the backslash-python API should look like.

Where there is TODO: it's a discussion I have with you/myself about the correct way to go

NOTHING is set in stone. Don't hesitate to change the whole thing if you think it is needed.
(Where there is Yotam - it's because the original version was Yotam's - feel free to handle it as well :))