Resolve batch after related fields have resolved

Previously, the batch promised was resolved before all of its associated models
had been loaded. This delays the resolve until everything has been populated.

@jofomah, could you look over this one to see if I've missed anything? It should
also fix the inventory list "table repopulating" bug we noticed a while ago.

See: https://www.flowdock.com/app/ehealth-africa/lomis/inbox/46825
Simplify resolved keys using $q.all() hash

`$q.all()` can take an object, so reference the resolved fields by name rather
than by index, see:
https://github.com/angular/angular.js/blob/fe0e434a87be433bce69b46031b3ef2c379ce353/src/ng/q.js#L489-L493
merge tlvince-refactor/batch-promises