Complete EMULATED and UNPLUG interfaces

Not tested yet but the code is more or less in its final shape.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>