Add SQLProduct reference to StockTransaction table

For reference, half of this came from @emord's PR (https://github.com/dimagi/commcare-hq/pull/4821) but had to be reran.