Reduce duplication/hardcoding related to platform flags

Signed-off-by: John Else <john.else@citrix.com>
CP-4147: Change the USB emulation platform flag semantics

Instead of having a single flag, "nousb", which turns off all USB
emulation, we now have two flags:

  - "usb", which controls USB emulation
  - "usb_tablet", which controls USB emulation, as long as USB emulation
    is turned on

xapi defaults to both keys being true, whereas xenopsd defaults to both
keys being false.

Signed-off-by: John Else <john.else@citrix.com>
Refactor out the platformdata checks

Signed-off-by: John Else <john.else@citrix.com>
CP-4145: Only allow parallel port devices to be passed through to qemu

Signed-off-by: John Else <john.else@citrix.com>
Move a function to test_common

Signed-off-by: John Else <john.else@citrix.com>
Add unit tests for the platformdata checks

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #1174 from johnelse/ea-1253-clearwater

CLEARWATER: EA-1253: Changes for control of USB/parallel port emulation