Fixing patchShadow function to support multiple edits.

Motivation:
There is currently a bug in the patchShadow method where instead of
iterating through all the existing edits only one would be applied.

Modifications:
Removed the reduce method and it now does a traditional loop iteration
where we can continue processing after patching a version.

Added a test case for multiple edits as there was nothing that covered
that use case.

Result:
It is now possible to process multiple edits.