support and tests for multiple stocks per case

read commit by commit for best clarity
depends on https://github.com/dimagi/casexml/pull/150