Added test to make sure inventory metadata is
updated during merging.
Implemented inventory merging metadata update.

Also DRYed __add__ and __iadd__.