add layer test case

moved mkdir() method to IoUtils to ensure the directory hierarchy always
exists before writing cumulative and references files
fix class cast error
move each patch element contents in separate directories inside the
patch
fix rolling back a patched layer
fix layers misc files + add-ons
fix patch apply operation

* in LocalPatchOperationStepHandler, build a Patch Runner using the
installation manager service instead of patch info service.
* fix class cast exception in local patch operation handlers
typos
generator wip