[util] handle constructor with validation

Constructors, validating handle and throwing exception on invalid
one.

Handle takes handle_type from traits.

Allow to use traits inside class derived from Handle

NB! Breaking compatibility: Handle needs only one template arg and Traits
should supply handle_type typedef

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