Use OrderedDict instead of a list of BatchItems

Now that we are already depend on python 2.7 for a lot of things, use
OrderedDict instead of a list of BatchItems.

That makes the object returned by batch selection dialog easier to manipulate
(the mapping is easier to use than to manipulate a list of tuples) and since
they are ordered, they can be used as original batches to keep the order when
editing the batches.

That way we can also use the dict on a domain api. We could not do that with
BatchItem, which was gui specific.

Change-Id: If57901ad5229bf152024df602ad33d7154ca3ace
Fix a small problem when double-clicking on existing batches

If the quantity is not being validated (for example, on POS, where we have a
suggested quantity, but the user can select something above it), the missing
quantity would be 0 (no validation means nothing missing) and that would make
us append 1 everytime a batch was clicked.

Instead of that, allow quantity to be None, so the value there will remain. In
that example, he would be already filled with the suggested quantity passed by
POS to it, it just have to fill the batch number.

Also, add a test that would've caught the problem.

Change-Id: I6c5bced6d5e249bc680ad1c0d41596e46f06d492