generic unique holder for handles

Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jollamobile.com>