Use QScopedPointer (RAII) for avoiding the memory leak for udev

Task-number: QTBUG-37578

Change-Id: I9e9146a1f7339a88c63cb320a47f63f069a6120e
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>