core: Improve performance of getVmDeviceByVmId

getVmDeviceByVmId is calling a query on vm_device_view
using vm_id as a parameter. Since vm_id does not have an
index, this query takes a long time.
This patch added an index, which improved performance in the
perf environemnt from 56ms to 0.2ms.

Change-Id: Icc45e9dd3e4b0cd23d0d28b017b19da13f315d5b
Bug-Url: https://bugzilla.redhat.com/1154421
Signed-off-by: lzelkha@redhat.com <lzelkha@redhat.com>