xenapi: refactor generate_ephemeral

Refactoring generate_ephemeral so it will be easier to generate
individual ephemeral disks when required.

Needed by blueprint xenapi-resize-ephemeral-disks
Change-Id: I7032bd4c7d80adb62f8d5ece085170c6b89e267d
Merge "xenapi: refactor generate_ephemeral"