virttest.qemu_devices: Set 'serial' parameter only when qemu supports it

Hi guys,

older qemu version (RHEL6) doesn't support setting disk serial number using -device serial=xxx, which is now the preferred method. This pull request check what parameters are supported for the current device and than ignores the 'serial' parameter in case it's unsupported. It shouldn't affect the test as the serial number is set in -drive serial=xxx thus the drive will also have the correct serial number.

To be able to do this change I added another function to DevContainer, which executes the qemu command with some extra options.

Last but not least I added cashing of the last execution in order to speed-up some tests. If you don't like it, you can accept this pull request without it. But I believe it will save time as most devices are added in loops, so the last execution might be reused multiple times.